I have a query node to insert data into a table. I have a seperate process to re

I have a query node to insert data into a table. I have a seperate process to retrieve that data via query database node, then display it on a form. The issue is after submitting the form to write to database and then immediately turn to the page that fetches that same row, it does not show up. I have to invoke the display process twice before the row actually shows up. I do have a confirmation page after the insert query node to provide the delay, but it seems like its not enough. What can I do in this situation? I don't want the user to lookup the row more than once to see the data....

OriginalPostID-35612

OriginalPostID-35612

  Discussion posts and replies are publicly visible

  • Does the process that populates the process variable completes before showing the form to the user? If the answer is "yes", then make sure your form has the "Refresh default values every time the task form is viewed " in its properties under the "Other" tab forum.appian.com/.../Other_Tab
  • Eduardo, I made that change but it made no difference. The thing is that I have 2 seperate processes. One to write to the database and one to pull from the database. When I finish with the first process and submit the form to write to database, I then move the other page to retrieve the new row which was inserted by previous process. It does not show the latest row immediately.
  • But have you confirmed via Monitor Mode or Process Variables Tab in Process Details that the variable you are using to display the retrieved data actually contains the updated value? You need to make sure the process to write is done before retrieving the data again.

    Are you using a quick task when retrieving the data for display purposes?
  • Okay I made sure that write process is complete before I launch the retrieve data form. There seems no significient delay in the write process. Data gets committed to database. I use the quick task starter form to get the input for the query condition then pass it to the query node, which then displays it on another form. The process variables in the retrieve process do still contain the previous row not the max row. I also noticed when I go to the monitor mode, the time showing on date and time variable is in different time zone, while my local settings are set to Eastern Daylight.
  • Take a look at the process history of your data retrieval process to make sure the process variables are being mapped correctly, I'd also take a look at the query to make sure it's correct. If running the query manually in your RDBMS correctly returns the updated data before running the data retrieval process then there's no way the Query RDBMS retrieves old data; the smart service works in the same way as executing the query in your RDBMS directly; so what you see in there is what you will get in Appian.

    Complete the Write Process, run the query manually in your RDBMS, then execute the data retrieval process and confirm there's a discrepancy; if there is; then open the instance in "Edit Mode" and check the configuration of the Query RDBMS node to make sure you are indeed running the correct query.