Conditional field based on reference field

I need to show certain fields/sections based on the value of another field (same model) that is a reference field…I’ve tried making the additional fields render based on the reference field name…and no dice. The problem here, I think, is that the value of said reference field doesn’t populate until I save the model (because it’s a reference to a related object). Yes, no? But even after I save and refresh, the conditioned fields don’t appear. Ideas?

It shouldn’t require a save. Can you check to make sure you have both the reference field and the corresponding NAME field selected. 

For example:

Account 
Account.Name

Application
Application__r.Name

Something like that.

Can you also screenshot the Render condition setup you have?

Both fields are in the field editor’s model. Here’s a screenshot (the specific value is set to “Child & Adolescent”


Does your value in the field on the page composer include the quote marks? 

No. Should it?

No but it would have made me a rockstar!

Would you mind granting login access to us following these steps?

We can take a look at it from there

Hi Will! I set this up. I’ve been waiting for a NDA to be signed.

Hi Will! Any chance you might have a chance to look at this? I’ve granted login access to Skuid. Let me know!

Oh, our org id is 00DA0000000H7PW

When you create a condition with a string that contains & in it like yours, the string is getting converted to &amp behind the scenes - which is not what you want.  See below:



What you can do is go into your page xml and find this condition, and change it from 

value=“Child & Adolescent”/>

to

value=“Child & Adolescent”/>

and see if that works.  

You also may want to consider changing your picklist value from Child & Adolescent to Child and Adolescent to avoid any hiccups in the future, since & is a common programming character.

I was wondering if that had something to do with it. I did change the condition reference to the HTML code but that didn’t work. I’ll just go change it to the word; that seems easiest. Thanks!

Okay so I tried adding some conditions to a different value of that field (it’s a reference field, btw, not a picklist…not sure if that makes a difference?) and it’s still not working. Should I reference the record ID in the render condition?

Hi Lauren, Will is unfortunately out for paternity leave. Which Skuid page are you looking at and which Salesforce field? Alternatively, if you share your email we could try and setup a short meeting to tackle this issue together.

Here’s my email: lauren.ake@eatingrecovery.com

Congrats to Will!!

Hey Karl – any thoughts on this? Or should I submit an email to help@skuid.com? Let me know!

Hey Lauren, I’m glad you were able to resolve this…feel free to post any more questions you might have here on the Community!