Skip to main content

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?

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


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


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.


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


Hi Pbear74,

 

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

 

 

Let me know if this helpsd you.

 

 


Reply