Row action token seems to always return first rows value

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a table populated from a model listing Accounts that should perform the following actions:
  1. Set the ID parameter of Model2 (SelectedAccount) to {{Id}} of the record related to the row selected and activate that condition
  2. Save the model (SelectedAccount)
  3. Query Model3 (Contacts) which filters based on matching AccountId to the Model2 Id.


The result is not what I would expect. In this case the Id value seems to populate with whatever the record ID of the first displayed row rather than the Id corresponding to the row of the table which was clicked (unless you happen to click on the first row button action which works as expected).

Is there something wrong with my syntax to access the current row context?
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 1,074 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,040 Points 10k badge 2x thumb
Hi Joseph,

Was this table action set up as a row action, mass action, or global action? 

Also, could you share a screenshot of what the model conditions look like? The missing context might be from there. 
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 1,074 Points 1k badge 2x thumb
Hi Mark, you were correct! As I was working to upload a screenshot I noticed that the model the condition was pulling from was from the Account list model instead of the Selected Account model which is why I was getting the behavior I was.
(Edited)
Photo of Joseph Ucuzoglu

Joseph Ucuzoglu

  • 1,074 Points 1k badge 2x thumb
So I seem to have run into another issue. Now the same listings will populate regardless of which button is pressed. I will update the post with the model in question and new issue that cropped up.

This is the field that should be set from Row Action


Here are the conditions of the AccountContacts model that is re-queried right after the SelectedAccount model value is set and saved.

*Note prior to your response this had the incorrect model in the condition which was the cause of the original problem this has been corrected to what you see below.



As of the result is when this model is queried the same limit of 20 records pops up no matter which row I click on all seemingly related to different Accounts.
(Edited)