You are viewing limited content. For full access, please sign in.

Question

Question

Updating Database

asked on November 24, 2015

Hi All,

Good day to everyone! :)

We are having problem when updating database.

Scenario:

If the file from LF repository is equal to file inside the database, then it will update the database with the status of Outstanding.

 

The problem here is that. Even if only one file is matched, all the data inside the database will be updated to Outstanding.

 

Are there any way that i can do so that the only file that will be updated is the document that matched?

B.Braun just sample.png
0 0

Replies

replied on November 25, 2015

Just at a glance, I can see that you are doing a "Query Data" activity that should only be retrieving 1 row (the matching document row), but then you have a "For Each Row" activity that basically does a loop of all the rows returned. Since you are saying that all the data in the database is being updated to "Outstanding", my guess is there is a problem with your "Query Data" activity. Could you share the details of the "Query Data" activity?

0 0
replied on November 25, 2015

I dont have the file here in my PC, but the "Query Data" activity is calling my database where all my data to be updated are saved. Can you share to me your idea?

0 0
replied on November 25, 2015

In your "Query Data" activity, there is a place for "Query Criteria". If you do not set any criteria (filter) on the query, then you are returning all the results from the table (unless you are using a view or sp that has the filtering hard coded). The other place where you will need "Query Criteria" is in the "Update Data as Outstanding" activity. If you want more details, you will need to share some screens of these activities.

0 0
replied on November 26, 2015 Show version history

Hello,

Please see attached files for your reference.

 

Under "Status", that's the part that we need to update automatically.

Please see "Updating data to outstanding" that's where we inputted the outstanding part.

You can see also in our "Query Criteria" we does put any data on it.

Under "If document match" sequence please see the decision we put.

 

We tried to use "if Billing Doc is equals to billing doc for each row in the database" then update the data to outstanding, if not it can be blank or update also to pending. But what's happening is that it updates all the row with either outstanding or pending. Thanks for your help. :)

 

Status.png
Updata data as outstanding.png
Query Criteria.png
If document match.png
Status.png (112.07 KB)
0 0
replied on November 30, 2015

The problem definitely lies in your "Update data as Outstanding" activity. In the "Rows to Update" section, you must give it some criteria to limit the rows that it updates. In your case, it is the "Billing Doc" token that you need to use there. I attached a screen shot to demonstrate:

Once you have that in place, you should be good. You will need to do the same on the "Update Data as Pending".

0 0
replied on December 18, 2015

Did this fix your issue?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.