Can some one explain how the below function evaluates, appreciate your help in advance!!
if(true, false, false, true, false, 30, 40)
Discussion posts and replies are publicly visible
I strongly recommend against using the function in this way since Appian's Engineering team does not document it as supported syntax. Keep in mind that there is likely a reason it is not supported officially - maybe it works in 99% of scenarios but doesn't work in one or two edge cases? It's not worth depending on a feature that isn't documented.
Instead, there are plenty of alternates that could work if you are trying to perform an if/then/else. Plus, the beauty of SAIL is that you can create reusable rules that include the logic you need. Here's an example:
choose( where( { ri!colorIndex = 1, ri!colorIndex = 2, ri!colorIndex = 3, true } )[1], "Red", "Green", "Blue", "Something Else..." )
Or, here's a reusable rule called rule!IfThenElse that you could call whenever you want an if/then/else statement:
index( ri!results, where( append(ri!conditions, true) )[1], ri!elseResult )
Or there's even a lot of scenarios where a decision rule would solve it for you.
Either way, use the power that Appian does provide instead of trying to rely on functionality that isn't documented.
Thank you Peter, much appreciated!
Can appain employees explain why this is undocumented but used in the basic training build an application step4? academy.appian.com/
Can you post a screenshot of exactly where and in what context this is used there? I tried your link but wouldn't be able to actually see the content in question without (presumably) enrolling in and then partially completing this course.
HI mike, here is the section in question