Hi everyone
i have a Table ( the name of the table is creditrequest)
and im trying to understand how can i update coloumns values in a specific row (with a specific id of creditrequest ) after that i inserted a row of creditrequest in the db for exemple.
i use also an interface where i saved those values, in the purpose of update the table.
Discussion posts and replies are publicly visible
You don't show the value of the CDT in your process instance following the form where these fields are being updated, so I can't be sure here - basically as long as the CDT has the Primary Key ID populated, then re-writing it using the WTDS node will cause that row to be updated with the current value of the CDT (including the updated fields).
do you talking about this the value of the CDT in my process instance ?
this is what i have after completing the form
If your hope is to update a row that already exists in the DB, then you'll need to query the value of that row (and/or multiple rows you want) into the PV prior to arriving at the form. Then on the form you can save new values into the desired specific parameters, and in the subsequent process flow you can write the new state to the DB.
In your screenshot here, it does not appear as if the Primary Key IDs are populated in your instance's PV, meaning when it writes the PV to the database next, it will write to new rows (with new PK IDs).
you right this what happened i added an WTDS node and it wrote a new row.
i didnt see it that the pk is not populated , but why it doesnt show the id of the creditrequest ,
i can see it in the db, do you know what is the problem ??
now if i understand you if in my process details i will see that the CDT will have pk , so when
i will re-write in it it will update the new fields that i want ?
Can you clarify - where / how are you initially writing the value of this row? Is it getting written once prior to the task from your screenshots, and then you're wanting to update that same row with the added details provided in the task?
If so, you need to make sure your initial WTDS node saves the Stored Value(s) back into the PV.
in the begining i m inserting row in the tables
and after i m arriving to the form where i need to update the creditrequest table
Again, you need to make sure that the PV value of creditRequest contains the auto-generated PK ID upon arrival at the "signature" task. I'm unclear if the lower screenshot process is a subprocess of the one in the screenshot above, but if it is, you need to make sure your WTDS node saves stored values back into the PV (see my previous comment for this setting) then passes the value of the PV into the subprocess.
i did what you said i saved in the initial WTDS node the creditrequest
but i dont see the id the process details.
i also checked my datatype and the auto-generated PK ID was already selected
yanivb0001 said:i saved in the initial WTDS node the creditrequest
the configuration there looks correct - can you confirm what the PV's value is in the process instance just after the WTDS node completes? I'm unclear whether your subsequent Process History screenshot is from the same process model and/or instance.
ok so i configured like you said the creditrequest CDT output as you saw in the first WTDS node
and after that this what i have in the process details in the "variables".
and after that i have the new tasks in process model , where i want to save the fields and update the row
but i did what you said i add a new WTDS node to rerwrite it
but i can see in the process details that it didnt save the new fields ( i have the same thing as above in the picture )
In the top screenshot we can see that the PV value has now been correctly set with the result of the initial WTDS node.
What happens next i'm still unclear on because your process is a bit spread out - is this all in the same process model?
What is the Data / Input configuration on the User Input Task node? You're setting the ACP to the value of the PV first, right?
I'd suggest getting used to these steps in a more simplified process flow, to be honest - once you get used to it in a simpler context it's easier to remember all the pieces you must put in place when it's in a more advanced flow. Can you review this with any of the other Appian developers in your organization?
the process i very simple , in the first place i just inserting data in the dbs
and just after that i have the input task where you can see in the last picture that i sent
now the user input task data / input configuration have to set like that ??
That configuration looks correct as far as I can tell. In your process instance, when it's gotten to the "signature" task, did you confirm that the PV value correctly reflects the PK ID(s)? This is where the "process history" tab becomes most useful, because if the PV has the PK ID values set and then loses them, this will show you where that happens. One additional thought: double check your Interface to make sure it's not accidentally overwriting other value(s) within the PV when doing updates on-form.
yes in the process instance my signature input tasks reflect the PK ID i can see it in the variable tab
but in the process history i cant see it.
i double checked the interface and im not overwirting nothing else because i only display all the data that i have in pv in the interface.
then i m just saving two fields in the rule input (which is name is creditrequest ) to update only those fields in table in the db, as you can see in the first picture that i sent .
yanivb0001 said:but in the process history i cant see it
The process history tab will show every state of the PV variable, so if it has the PKid at one point and then doesn't have it at another point, it will show you where - make sure you click through if there are multiple pages.
ok i understood you that is showing every state of the pv,
but even at the beginning of my process , just after that i used the initial WTDS node to wrote the pv in the data store
i cant see in the process history the ID of the creditrequest pv , it is weird
yanivb0001 said:i cant see in the process history the ID of the creditrequest pv , it is weird
If you can see it in the "variables" tab in the instance monitor, then you will be able to see it in the Process History tab somewhere - just need to keep looking. Process History is typically several pages (or more) with several screens-full of data per page, which you need to scroll among.
ok i checked as you said in the process history and you were right i can see the process variables ID
and after that just after the signature input tasks i saw that my two new fields that i saved, got saved.
but after for the WDTS node i see it blank
This indicates that this node completed with no changes to the local PV value - which would be expected if you're updating it to the DB following the task (since the WTDS node would be introducing nothing new to the PV value after the initial writes were completed earlier).
oooh ok thank you it worked finally
thank you very much
Sweet, thanks for confirming -- as a side note, when you get a chance i'd be grateful for up-votes and/or "verify" clicks on whichever of my answer(s) you found most helpful