DannyH
Novice

Nested IF statment in SmartForm rules

Jump to solution

I am tryng to create a nested if statement for a form that will allow me to have a top level IF statment with a bunch of sub level IF statements within it. 

For example:

 

IF(viewcontrol = 0)

{

    IF(param = "a")

    {

        Do Something

    }

    ELSE IF (param = "b")

    {

       Do Something

    }

    ELSE IF (param = "c")

    {

       Do Something

    }

}

 

That is what i am trying to achieve but the best I can do is something like this:

IF (viewcontrol = 0)  AND IF (param = "a")

{  

   Do Something

}

IF (viewcontrol = 0)  AND IF (param = "b")

{  

   Do Something

}

IF (viewcontrol = 0)  AND IF (param = "c")

{  

   Do Something

}

 

Is it possible to create a nested if like the first example i have listed?

Reply
5 Replies
JohanL
Apprentice

Re: Nested IF statment in SmartForm rules

Jump to solution

Hi,

 

I would create several data labels each containing one of your sub level if statements.

You can then create the if expressions on these data labels and assign their values as True/False.

 

Where you want to perform actions, combine these data label results as you desire.

 

I hope this makes sense.

Let me know if anything is unclear.

 

Regards,

JohanL

0 Kudos
Reply
Gail_K2
Apprentice

Re: Nested IF statment in SmartForm rules

Jump to solution

Dear PBear74,


Nested If statements for rules in SmartForms is on the roadmap for a future update (hopefully 4.6.10).


Thanks, and regards,


Gail

Reply
Taffy_Lewis
Novice

Re: Nested IF statment in SmartForm rules

Jump to solution

Thanks for the heads-up, I started looking here because I was trying to nest a couple of If(s).  I did not know that its not possible yet.  Thanks again for this post.

0 Kudos
Reply
carlar
Novice

Re: Nested IF statment in SmartForm rules

Jump to solution

Has this been resolved?  I'm trying to do the same as below but can't seem to accomplish it with an unbound rule.

0 Kudos
Reply
Kran
Apprentice

Re: Nested IF statment in SmartForm rules

Jump to solution

Hi Pbear74,

 

      you can use unbound rule to achive this,  refer below link for more on this.

 

 

Let me know if this helpsd you.

 

 

0 Kudos
Reply