Unable to render 2 fields using a basic Condition. Please Help!

edited June 25, 2020 in Questions
Objective: I have 2 nos of same fields in a field - editor. (AADHAR Status)


1. When the Value is Y (Field 1 should get display) - This has a CSS - Green


2. When the Value is not Y (Field 2 should get display) -Β This has a CSS - Red


The desired output: Only one Field should be visible at a time. If the value in Y then the 1st one (with Green CSS) and when the value is not Y then the 2nd one (with Red CSS)

But, I am unable to render the fields properly. Instead, I am getting the following Result.


Any help will be highly appreciated.



  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited June 25, 2020
    Try just one of the fields and see if that one works.
  • edited June 25, 2020
    Yes it works.
  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 18, 2018
    So having two of the same field with separate render conditions is causing both to appear? If so, my suspicion is correct. You've found a bug.

    What version are you using? Can you test in a sandbox with newer versions?

    Does the field need to be editable? If not, you can use a template field to conditionally render the "Y" with custom css using a formula field in the template.

    You'd create a UI-Only Boolean called AADHARIsYes. Using this you could set the class of the div in the template field. Something like this.

    <div class="{{#AADHARIsYes}}yesClass{{/AADHARIsYes}}{{^AADHARIsYes}}noClass{{/AADHARIsYes}}">{{AADHAR__c}}</div>
  • edited June 25, 2020
    We have to make some assumptions about the code that is not included. Is "AADHAR Status" the label for Aadhar_Authenticate_Aadhaar__c? One also is curious about Aadhar_ and Aadhaar_ . That should be correct using the designer field lists, but field names can change. Rendering rules don't throw errors like SOQL would.

    (Pat, I'm am missing something; I don't understand your suggestion.)
  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 18, 2018
    When using a Template field you can conditionally include text using Boolean fields.

    My example calculates in UI-Only Boolean formula field AADHARIsYes as True or False. The formula would be TEXT({{AADHAR__c}}Β  == "Y".

    UsingΒ {{#AADHARIsYes}}yesClass{{/AADHARIsYes}}{{^AADHARIsYes}}noClass{{/AADHARIsYes}}">{{AADHAR__c}} would render as class="yesClass" when AADHARIsYes is True and lass="noClass" when AADHARIsYes is False.

    The # is for True and ^ is for False.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!