Is there a case statement /function in Appian . or an if ...else if in rules exp

Is there a case statement /function in Appian . or an if ...else if in rules expressions . Coding in terms of if , if ... is time consuming and code readability is bad .

OriginalPostID-219960

OriginalPostID-219960

  Discussion posts and replies are publicly visible

Parents
  • As long as the rule doesn't return a list, an additional call to fn!choose() isn't required and requirement can be accomplished just by making use of fn!dislayvalue() as follows:


    fn!displayvalue(
    ri!status,
    {
                        "Approved",
                        "Rejected"
              },
    {
                        rule!myRuleForApprovedStatus(),
                        rule!myRuleForRejectedStatus()
              },
    rule!myDefaultRule()
    )

    In case if the rules returns lists, fn!choose() can be used.
Reply
  • As long as the rule doesn't return a list, an additional call to fn!choose() isn't required and requirement can be accomplished just by making use of fn!dislayvalue() as follows:


    fn!displayvalue(
    ri!status,
    {
                        "Approved",
                        "Rejected"
              },
    {
                        rule!myRuleForApprovedStatus(),
                        rule!myRuleForRejectedStatus()
              },
    rule!myDefaultRule()
    )

    In case if the rules returns lists, fn!choose() can be used.
Children
No Data