change list commit

2
In the change list activity there are 4 types (add,remove,clear,update) when I execute one of those actions on a list,is every action will just affects on the list that will be shown in a form but will not affect on the database itself. i say that because I am working on a list and when I made change activity of list with type clear in order to delete the list from database but that's not happened so I went to delete the list through looping on the list and delete object one by one to fix this issue
asked
1 answers
3

Since your issue does not seem to be entirely clear from the question:

Were you trying to delete objects from the database by using a 'Clear' activity on a list in a microflow?

In that case, that's not something you will be able to do that way. Lists are variables which exist in a microflow, but cannot be committed to, retrieved from or deleted from a database. (As far as a database is 'concerned', microflow lists do not exist) Once the microflow is finished, you will no longer be able to access a list; it solely exists for the duration of the microflow, and does not get written to the database. When you clear a list, the only result is that that list in the microflow is empty; it will not have any impact on the objects in the list, they will not be deleted from the database.

The most common use of a list of objects in a microflow is to repeat an action or series of actions multiple times for each object in the list, using a loop. For example to change attributes, set associations, delete objects, etc.

It seems you solved the issue by looping over the list of objects (which you retrieved or created) and used a Delete activity within the loop to delete all the objects one by one. This is indeed the way you'd delete a list of objects from the database in a microflow.

answered