Page Include popup child records

  • 1
  • Question
  • Updated 5 months ago
  • Answered
I have a table displaying Accounts and a row action show popup with a pageinclude of the related Contacts.   I am unable to retrieve the correct Contacts in the page include as it always pulls the Contacts for the first Account in the table row.  

My page include query string is:  account_id={{$Model.Accounts.data.0.Id}}.   And the condition on the page include Contacts table is set to query on page load with the settings shown below.
Any suggestions on what I am doing wrong greatly appreciated!  I swear I had it at one point but not sure how.  Thanks!  (Milau 11.1)
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb

Posted 5 months ago

  • 1
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
That 0 in the merge value is item 0 in the Accounts model data - by definition, the first row. You should be able to just use account_id={{{Id}}}. (You might need the triple mustache here.)
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb
That did it!!  Used triple brackets.   Thank you Mike!!
Photo of Dinesh Ramanadham

Dinesh Ramanadham

  • 372 Points 250 badge 2x thumb
Here when you said {{$Model.Accounts.data.0.Id}}, it will always take Id from the first row in Accounts model. If I am not wrong, you can just use {{{Id}}} to pass the Id of the Account record on which you were clicking this page action from.
(Edited)