Dynamically hide/unhide error messages

Hi all,
I wanted to call a rule with the value being selected in a dropdown immediately.
So that, depending on the dropdown value, I can hide/unhide a particular error message.

Any inputs are highly appreciated!!!

OriginalPostID-193861

OriginalPostID-193861

  Discussion posts and replies are publicly visible

Parents
  • Adding to what John said above, you can show the error message in a richtextfield based on the value(s) of your dropdown. Let's say your dropdown value is getting saved in a variable local!drop. And when this value is getting populated with "A", you need to show the error message. You can refer the below pseudo-code.

    with(
    if(
    local!drop="A",
    a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
    a!richTextItem(
    text: "Your error message",
    style: "HEADER_SMALL"
    )
              }
              ),
              {}
    )
    )

    I have used with() here so that this expression will evaluate with each change in the dropdown value.
    Same can be done with a couple of dropdown values by adding all/multiple the conditions using logical functions like "or()" or "and()".
    Like - if( and (local!drop1="A",local!drop="B"),"show error message in a rich text", {})
Reply
  • Adding to what John said above, you can show the error message in a richtextfield based on the value(s) of your dropdown. Let's say your dropdown value is getting saved in a variable local!drop. And when this value is getting populated with "A", you need to show the error message. You can refer the below pseudo-code.

    with(
    if(
    local!drop="A",
    a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
    a!richTextItem(
    text: "Your error message",
    style: "HEADER_SMALL"
    )
              }
              ),
              {}
    )
    )

    I have used with() here so that this expression will evaluate with each change in the dropdown value.
    Same can be done with a couple of dropdown values by adding all/multiple the conditions using logical functions like "or()" or "and()".
    Like - if( and (local!drop1="A",local!drop="B"),"show error message in a rich text", {})
Children
No Data