Hello, I have a multiple if condition that returns a list, but what I need is for it to return the condition that is only true. Thankss!!!
if( {and( ri!tipo = "Alzada", a!isNotNullOrEmpty(ri!feRegistro), ), and( ri!tipo = "Reposición", a!isNotNullOrEmpty(ri!feRegistro), ), and( ri!tipo = "Revisión", a!isNotNullOrEmpty(ri!feRegistroAdmin), ), }, {ri!feRegistro + 90, ri!feRegistro + 30, ri!feRegistroAdmin + 30}, {ri!feRegistro, ri!feRegistro, ri!feRegistroAdmin} )
Discussion posts and replies are publicly visible
You have mixed up a lot of things here. Can you help me understand what are you trying to achieve? Try giving the sample input and desired output based on that input. That should help.
What I am trying here is that if it is of a type ("Alzada", "Reposición", "Revision"), the date that is completed in a field adds 90 or 30 days at the date selected
the date is rule input ri!feRegistro, ri!feRegistroAdmin is a date, and tipo is a text
See if this helps.
if( or( ri!tipo = "Alzada", ri!tipo = "Reposición", ri!tipo = "Revisión" ), { ri!feRegaistro + 90, ri!feRegistro + 30, ri!feRegistroAdmin + 30 }, { ri!feRegistro, ri!feRegistro, ri!feRegistroAdmin } )