Actions

I have a series of action buttons. 

Each button I want to change the "Status" of that particular row. 

It works for the first row but the other buttons on different rows only changes the top row? 

How can I resolve this? 

Thanks Screenshot 2022-04-19 112522.png

Solved Solved
0 9 176
1 ACCEPTED SOLUTION

Well yes, but you need a way to identify each row in a unique manner, and since that's an inventory table, I'm guessing you can have several references to the same client, which would mean the Contact ID would repeat between rows, and when you have a repeating KEY in your table, then you get the kind of behaviour you're seeing in your actions, you can read more here:

https://help.appsheet.com/en/articles/1023086-what-is-a-key

I believe your problem can be solved by creating a new column for storing UNIQUEID() for this table, that way you won't have any more repeating KEY values.

When you run an action on a row that has a duplicated key, it just run the actions on the first row it can find that has that key value, which as you saw is not necesarily the row you actually ran the action on, just the first occurence.

View solution in original post

9 REPLIES 9

Hello @Fre3, you mean that action only ever changes the [status] column of the first row in that table, no matter where you execute it from? 

That's quite unusual, have you checked what's happening in your back end? is the status column editable for all rows? 

Yes, so if I press the active button (volcano) in any of the other rows it changes the [status] of the first row. This is the same for all of the buttons I have made but I can't see any faults in the way I've created them or anything. 

It only changes the first row's value. All the actions are set up the same and I'm not getting any errors or anything. behaviour.pngactive.png

@Fre3 are your key column values unique to each row? That's the only thing I can think of right now that might generate such behaviour

TScreenshot 2022-04-19 134526.png

This is the table where the actions are located. The "active" row is where the actions are in lined. 

@Fre3 your key column is a REF to another table, are you sure this constitutes an UNIQUE key?

If it repeats then that would be an explanation for the issues you're facing, I suggest you create a column for storing a uniqueid() for each row on that table.

What do you mean? The key column is the Contact ID, no?

Well yes, but you need a way to identify each row in a unique manner, and since that's an inventory table, I'm guessing you can have several references to the same client, which would mean the Contact ID would repeat between rows, and when you have a repeating KEY in your table, then you get the kind of behaviour you're seeing in your actions, you can read more here:

https://help.appsheet.com/en/articles/1023086-what-is-a-key

I believe your problem can be solved by creating a new column for storing UNIQUEID() for this table, that way you won't have any more repeating KEY values.

When you run an action on a row that has a duplicated key, it just run the actions on the first row it can find that has that key value, which as you saw is not necesarily the row you actually ran the action on, just the first occurence.

Ah, I see. That sounds like that's what's happening. I will try this now. Thank you 🙂

Top Labels in this Space