Currently in the form when it loads should check to see if there are any freight

Currently in the form when it loads should check to see if there are any freight options already there and show them (as it does now) then when the user submits the form the existing freight rows in the DB should either be updated or deleted and overwritten. Could anyone let me know in how I can use the Query Database smart service and what query I should write so that existing freight row should be updated or deleted and overwritten. This query we have used earlier and in this case it deleted the existing freight detail (DELETE FROM prmprojectfreight WHERE projectid = ac!projectId and amount>0)

What we need instead of deleting the existing frieght it should be updated or deleted and overwritten in DB.
...

workflow.docx

OriginalPostID-136521

OriginalPostID-136521

  Discussion posts and replies are publicly visible

Parents
  • We are not using SAIL form. In this case we have added a "Write to Data to Data Store Entity" . In it the data is storing but when we update data in the grid screenshot attached it getting a duplicate row in DB instead of overwriting to DB for that record. Earlier we used Query Database Smart service (DELETE FROM prmprojectfreight WHERE projectid = ac!projectId and amount>0) after Write Project Data entity to store the project information.
    and the issue is when we used this query it deleted the existing freight instead it should be updated or deleted and overwritten in DB.


Reply
  • We are not using SAIL form. In this case we have added a "Write to Data to Data Store Entity" . In it the data is storing but when we update data in the grid screenshot attached it getting a duplicate row in DB instead of overwriting to DB for that record. Earlier we used Query Database Smart service (DELETE FROM prmprojectfreight WHERE projectid = ac!projectId and amount>0) after Write Project Data entity to store the project information.
    and the issue is when we used this query it deleted the existing freight instead it should be updated or deleted and overwritten in DB.


Children
No Data