What happened to the "Do no run template on each row option"?

  • 2
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
I just noticed the "do not run template on each row option" is not available in the latest release for the template component.  What happened to this?

Referring to no 6 in the screenshot below

It's missing now....
Photo of Brandon Klapholz

Brandon Klapholz

  • 102 Points 100 badge 2x thumb

Posted 2 years ago

  • 2
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
I'm on version 7.36 and 8.11 and see this option. What version are you on?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
There is a difference between a template field and a template component. Template fields only apply to a single row by nature. Template components can apply to multiple rows. It looks like you are setting up a template field, not a template component which would explain the different options.
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
I am having an issue with "Do not run template on each row".  If I uncheck it shows a line for each record with name and text merged.  


If I check the box, 1 line line shows as expected without the merged name (Bill Fox). 

Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
If you have a row with multiple rows, the component won't know which row you want the info from unless you specify it with your merge syntax. Something like {{$Model.MyModel.data.0.Name}} . So I think you will either have to create a model that only has a single row and then set the component to run template on each row, or use a merge syntax that indicates what row from a model you want to pull from.
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
Thanks Raymond. Do you see a reason why this wouldn't work?
  

Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I think it is because you are referencing the model Phone_List_Person , but because you checked "do not run template on each row" it isn't running it on any rows. The template component doesn't default to row 0 (the first row in a model) when you deselect that button. You need to define which row of model Phone_List_Person you want the merge to come from. So something like
{{$Model.Phone_List_Person.data.0.Connected_Member_DNA__r.Person__r.Name}}
That would tell it to merge in the Name of the Person from the first row of the Phone_List_Person model. If you want information from the fourth row of the model, you would replace the zero with 3.