formula text field not showing as link

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
I have a formula text field

It works fine until I use it in this scenario.




It show like this:

Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yes, when you drag the child relationship field from the model down into your table, and use the template to define specific fields - field renderers are not used and the data comes through by itself.  This is a known issue. 

You can get around the issue by dragging a regular template component into your table and then using template code that looks like this: 
{{#ObjectName.records}}{{FieldName}}{{/ObjectName.records}}

Make sure your field name is only wrapped in 2 braces.  This will run the field renderers and turn the hyperlink into an actually link...

Cheers! 
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
I tried this:  

But is froze the screen.  

My child relationship name is: Member_Organization_Location__r
The data I had in the template which did not create a link was this:  {{Person__r.View_Person__c}}

If these are my fields what should the template look like?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I'm pretty sure it would be: 

{{#Member_Organization_Location__r.records}}{{Person__r.View_Person__c}}{{/Member_Organization_Location__r.records}}

Make sure it has two underscores between the object name and the letter r...  That tripped me up this morning.. 
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
I copied it exactly with the two underscores and it hangs.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Any javascript errors? 
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
It never errors out.  It just keeps showing "Searching" until I end it.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Open the Browser console - I'm thinking there will be an error there.  There will not be an error in the UI.  It will be in the console. 
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb
This one is not solved
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Ok. I think I've figured this out.  

I think you have given the relationship a particular name.  See the screenshot below of the Child relationship filed (not on the parent object).  See below where I've given the child relationship a custom name. 




Then in your child relationship picker in the model fields - you will see that custom name. 



Finally in your template code you need to use the relationship name,  not the object name. 

So in the arragment above my template code should be: 

{{#FooFooObject__r.records}}{{FieldName}}{{/FooFooObject__r.records}}

Also remember to incldue the fields from your child relationships in the model or you will get wierd results.  

Hopefully this one gets put to bed...