"Primary key __id is not unique in the supplied array" - Bulk Update

Hey @Classified

Instead of using the current flow, you can simplify it by using additional scope to update the data.
Just follow these steps:

  1. In your table component, set the "On Save" action to run the desired query.
  2. Use the additionalScope option to pass the data you want to update.

Refer to the screenshots below for guidance:



This method makes the process more dynamic and manageable.

4 Likes

Hi, thank you for your response :slight_smile:
I will indeed need your flow on top of what I was trying to implement.
I'm trying to update a lot of records to the same value.
So basically we do a search for a an amount of records, then when press the select all checkbox on the top of the table.
Then in my flow (like in the video) we open the split frame with a form that has all the fields in there that could be bulk updated.
We set a value in there and it would update for all the selected records in one go instead of having to update each field value individually.

I'm still having this issue. Anyone know why it's saying what it's saying?

@Classified,
I THINK it's because you have id AND __id. You should only be using one. Since you have defined the column in your database as __id, you need to use that. See if that change gets rid of the error and let me know. Thanks!

2 Likes

Thank you!

following the tutorial I thought that "id: key" had to be just that on the first screenshot.
as well as the .status had to be the field names.