if the outageEligible (boolean) is false , then I need to null the value for outage(boolean)
if(rule!GBL_isnull(ri!outageEligible,false()) , a!save(ri!ouage,null(), a!save(null(),null()))
above is the code , I am using. But it is not working
Discussion posts and replies are publicly visible
Hey,
a!save( target, value)
In interface saveInto parameters, updates the target with the given value. Use a!save for each item that you want to modify or alter in a saveInto parameter. This function has no effect when called outside of a component (saveInto parameter).
saveInto
According to your question, you can give this a try based on my understanding:
If outageEligible is false, save null in the outage rule input; otherwise, not
if(or(ri!outageEligible)=false,a!save(ri!outage,null),{})
In your code, you are comparing a boolean with a boolean. Instead, it could be further simplified as
if( or(ri!outageEligible), {}, a!save(ri!outage, null) )
if( ri!outageEligible, {}, a!save(ri!outage, null) )
or() with booleans is used to convert null into false.
if() treats null just like false already.
I wish every function in Appian was designed this way, but sadly it varies. So this is a standard practice I use every time when dealing with booleans.