Clearing/Saving over database rows

Clearing/Saving over database rows

Comments

  • Hello,

    I have been working on a flow that has an initial form that requires user input, that then saves said data to a database, sends form data in another form with additional fields as an assignment to someone else, and then theoretically saves the assignment data into the database with the original data as well. However, for both forms our database saves a new line.Is there a way to have Decisions save initial data against some id with half the fields blank, then come back once the assignment is completed and save the assignment data back into that same row?

    Another issue, is there a way to wipe all data in a database? Weve built a database and since debugging quite a lot has 500+ lines in it now that are useless. Instead of building a new data structure and re-mapping can we just wipe the current database?

  • Hello Peanut,

    It sounds like you want to know how to update an existing row in a table. Many User Defined Types generate their own CRUD actions as steps. The Create step will insert a new row. What columns need to be populated largely depends on how the structure is setup. The scenario you described of inserting a row without some columns populated is fine in many cases. You can then fetch the row you want updated by id and/or other fields you have set. Then use a Selective update step to modify that existing row.

    I attached an example which creates a new row for a Parking Garage structure. Then the row is fetched by id and data is passed into a form where the user can specify a capacity for the garage. The capacity is then mapped back into a Selective update step and the row reflects the changes.

    As far as clearing out a table, the quickest way is probably to run a delete query on the table itself. This would likely be okay if it is for a data structure you created or if it is process data. Either way, we recommend performing a backup of the database to prevent undesired data loss.

Sign In or Register to comment.