Hello,
I'm working on project and using the same form steps as "https://docs.appian.com/suite/help/21.2/form-steps-pattern.html", I'd like to change the color for the stamp field to be red if there's an error in the step. I added "validate: true() " to the next button.Is that possible to moving forward to the next step and just change the color if the step contains an error. Thank you for your help!
Discussion posts and replies are publicly visible
You need to provide additional IF condition in following piece of code, when that specific condition is true you will return "NEGATIVE", instead of "POSITIVE" or "ACCENT".
backgroundColor: if( fv!index < local!currentFormStep, "POSITIVE", if( fv!index > local!currentFormStep, "#949494", "ACCENT" ) )
Thank you for your reply!
I believe for backgroundColor I can't add two if conditions, should I use OR operator to do that ?
We can have nested "if" anywhere "if" is allowed. Please refer to the following sample code.
Ex.
if( <Condition1>, <Action1>, if( <Condition2>, <Action2>, <Else Part> ) ) /* ------------------------------------------- */ backgroundColor: if( <Condition>, "NEGATIVE", if( fv!index < local!currentFormStep, "POSITIVE", if( fv!index > local!currentFormStep, "#949494", "ACCENT" ) )