Multi tier / Chain If Then Else - How to construct?

Hi all,
This is something that I’ve been trying to wrap my head around all day. The logic of multi tier “If-Then-Else” has escaped me for some reason. Tried reading this topic, but didn’t help :frowning:
So, the scenario is as follows:
User is presented with an option to send out a message. One option is SMS, which will then ask the user to input the SMS content inside a text input. Another option is to send WhatsApp, in which case the system will automatically generate a URL and present a button for following that URL. Once user click on the button it will open the link in a browser, but it will also toggle another field (WAlinkClicked) from false (default) to true. Last option is, well, to do nothing. Don’t send out anything.
Once this step is complete, user will be given the option (right?) to proceed to the next step.
To cut a long story short, The user can proceed in only one of these situations:

  1. Selected SMS and inputted content
  2. Selected WA and clicked on the button
  3. Selected to not send anything.

I’ve built three If-Then-Else columns to capture all options. Here’s how I constructed them:
1.

What am I missing?
Please help to bring the order back :slight_smile:

My gut tells me that you’re making this way more complicated than it needs to be :wink:

First question: what is the purpose of those 3 if-then-else columns? That is, what do you use them for?

Based on your description, I’m not sure that they are necessary. I’d envisage something along the following lines:

  • A choice component, writing to a user specific column, with 3 options:
    – Send SMS
    – Send WhatsApp
    – Do nothing (skip?)
  • And then a set of screen components for each option, with their visibility driven by the value of the user specific column

And that’s it?

1 Like

Where’s the fun in keeping things simple? :open_mouth:
You’re right, indeed the components appear on the screen based on the users choice. The need for the first two columns is to make sure they actually interacted with these components, i.e. inputted text if choosing SMS or clicking the link if choosing WA.

The need for the third column for a larger If-Then-Else which controls if a user can click “save” on the custom form. They are not suppose to be able to save if they don’t meet one of the options I listed in my first post below.

Now, I fear there’s another under-the-hood challenge here. What happens if the use initially chooses SMS and indeed fills out the free text component, only to then change his mind and go with WA but forget to click the link. The free-test component will disappear from his screen, but we need to make sure the user won’t be allowed to save in this situation (as he/she hasn’t click on the WA link).

Okay, so the purpose of the if-then-else columns is to control the availability of the final step, yes?

Let me think about this for a little bit. Should be possible with a single if-then-else column.

It was easier to build this out than it was to describe it :wink:

This might not be exactly what you want, but hopefully it will help.

1 Like

Hola,

I understand the Daren’s idea and it’s fine but let’s assume we must work with @Test_Test’s parameters/options:

we have:
A= Selected SMS and inputted content
B= Selected WA and clicked on the button
C= Selected to not send anything.

and

… The user can proceed in only one of these situations

therefore, the logic has 3 possible results:

  1. True/False/True ​(1-0-0)
  2. False/True/False ​(0-1-0)
  3. False/False/True ​(0-0-1)

but the ITE column works using a logical OR, in other words, it looks for the 1st coincidence to mark its result as True so, you need to create something like this to get what you want:

and a procedure to avoid user can select 2 or more options at the same time.

I hope it helps!

Saludos

1 Like

Hola,
Many thanks for this, but I’m sorry to say that I don’t understand the logic behind it. Could you please explain a bit more?

Also here, not sure I understand what is “procedure”. Is this a built in solution?

Thanks

Wow Darren, thanks a million for this.
If I’m not mistaken, this is the heart of my confusion:

My “Save” button also checks many other inputs (phone number, name, etc). Each such inputs is flagged as True or False with their own columns, most of which ITE but some RegEx.
The solution in the screenshot above means that the button will show if any of these scenarios occur (which is what OR means…). How do I replicate the same logic (any/or) into an ITE column?

jeje… sorry, I didn’t want confuse you more :wink:

Using the Darren’s example, these are my A,B and C options following your instructions

we have:
A= Selected SMS and inputted content
B= Selected WA and clicked on the button
C= Selected to not send anything.

The “procedure” is what @Darren_Murphy carried out to validate values and allow (or not) going forward in other steps/tabs.

Saludos

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.