Skip to main content

I have overriden a Salesforce tab, and am trying to dynamically render sections or rows based on today’s current date and a picklist field with month numbers (ie. 7 = July).


I have added an UI-Only Model, and have set a render condition looking to that model, but it doesn’t appear to be working. Here is the UI-Only Model:


And here is the rendering condition:


(Work_Anniversary_Month__c is a picklist of month numbers 1-12)


So the end goal is to display sections or rows based on if the row has Work_Anniversary_Month__c = TODAY(Month)


Does anyone have some insight into how to get this to work?

You could try displaying the values from both fields in something like a rich text component on your page to see if you are getting the values you are expecting. You could also try to do the comparison inside of the UI only formula field and have it return true or false, then render components/fields based on the formula returning true or false.


I would move the UI only fields to the same model that the components use. I’ve had issues working with conditional rendering based on values from another model.


Oh … and the value you have needs double mustache. {{}}


Thanks for the suggestions! I tried moving the UI only fields to the component model and changed the mustaches, and unfortunately still not working. Here is the formula for the UI only field:


And here is the updated rendering condition:


Any thoughts on why this still isn’t working?

Thanks!


Did you try adding the UI only fields to a field editor to see the values live?


I did - the formula is pulling up the correct number, but it likely has something to do with returning multiples. See screenshot:


The goal is to list rows in a section if the Work Anniversary Month = CurrentMonth. But as you can see, when the UI only field is in a field editor on the page it returns multiple rows.


What is the birthday month value?


Birthday Month and Anniversary Month are both picklists with values 1-12. So when updating a row with Birthday Month or Anniversary Month with “7”, right now it would say “7” on the row but that still doesn’t meet the render condition for some reason.


Can you post the XML for the page?


I am fairly confident that if you do the formulas as salesforce fields instead of Ui only, then add then to your models, then base the render conditions on those fields you will get the result you are looking for.


Reply