Hi,
After every user input task completed i have called write to data store entity to insert data to table so over all in main process i have called three times so after every user input task a new row creating the values is not getting updated but after every user interaction a new row is getting inserted. i have updated the details correctly like below in input and also in output tab i stored the ac values to cdt. kindly suggest me on this and autoincrement i have given to Id column in cdt
Query:
Discussion posts and replies are publicly visible
if you want to update a existing row, you have to send the Primary Key value in your inputs..
If you dont send this, appian inserts a new record.
dharanik2600 said:also in output tab i stored the ac values to cdt
Can you confirm from your running process instance that the stored PV value contains the Primary Key ID autogenerated in the new inserted row? Also can you verify that you have the primary key ID column set to AUTO_GENERATE in the DB (or, alternatively, that you're populating one manually)?
I have defined I'd value only as primary could you please let me how to pass that value as input
Thank you for the details
running process instance primary key id pv is not having the value while inserting to db only id was generating in db i didnot provided as auto generated but in cdt while creating for that id column provided as auto generate
dharanik2600 said:primary key id pv is not having the value
That's why a new entry is getting created, to update an existing record you need to ensure that your pv!Division_Hierarchy_Details is having the primary key id populated before WDSE i.e., when you are saving the value in this pv! from UIT node input.
Also, there is no point passing the pv! in saveInto (from the screenshot) in this case, just save the stored values from node output in the pv!.
Thank you for the update will check on the points you mentioned thank you
Header the user to a new page :
if (isset($_POST['submit'])) { $user= $_POST['username']; $email = $_POST['useremail']; $pass= $_POST['password']; mysql_query("INSERT INTO table (username, useremail, email) VALUES(`$username','$useremail','$email')"); } //best outside the if statement so user isn't stuck on a white blank page. header("location: landing_page.php"); exit;
By doing this the user who refreshes will be refreshing landing_page.php which means it won't do the insert twice.
Best advice: do a check to see if user exists first if so don't insert!
How is this relevant to an Appian process?
Thanks for updating me on the points you mentioned, I will take note of them. Thank you very much.