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
I tried to turn your code into a more readable version.
if( rule!GBL_isnull(ri!outageEligible,false()), a!save( target: ri!ouage, value: null() ), a!save( target: null(), value: null() ) )
Not sure what you are trying to do here, or where this code snippet is used.
Maybe something like this might work better:
if( rule!GBL_isnull(ri!outageEligible,false()), a!save( target: ri!ouage, value: null() ), {} )
Hello preethas0001
preethas0001 said:a!save(ri!ouage,null(), a!save(null(),null()))
Is your rule input named the same? Why do you have a second a!save(null(),null()) which does not make any sense.Also can you share your code properly and the button widget code.(Hope you are using this logic in a saveInto parameter)
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) )
Yeah , I am using into the saveinto of button widget
Thank you , this worked
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.