How Do I Update All Records in a Data Store?

I’d like to update the field is_selected to the value 0 in all records stored in my data store contacts.

Do I need a repeat loop for this or is there a specfication I can make in the Which Records part of the Update action to do it in one command?

Hello Antony,
in the Update Data store event you can filter which records to update using the “Which Reords” to update.

Filter by your is_selected (enter the current value) and enter the new value you want to add there.
Example - all the records witch have a task value == 5 will be updated to 0.

2 Likes

Hi Teodor…

So I just put literally 1 for is_selected in the Which Records section, and then 0 for is_selected in the New Values section?

1 Like

Yes, that should do the job

Hi, Teodor! What if I want to change all the records in the Data Store?

Do they have anything in common (property, value)? And what would you like to update?

Add an extra property, such as ‘allitems’ to the data store and put a 1 in it for every record when the record is added. That way you can identify all records that have a value of 1 for allitems

2 Likes

This should work, thank you!

As I see, Teodor has liked your answer, so I suppose I’m not gonna wait for a more sophisticated solution. :smile:

1 Like

Glad it can help :beers:

1 Like