Justinmind-logo
 
Upvote 1

to un-nested OR condition

Known azhar.yatim@gmail.com 6 months ago

I have a nested OR condition but it seems that it automatically nested 2 of it (refer to attached image). How can I get it to be like:

When.. [ [ Value A = 1] OR [ Value B = 1] OR [ Value C = 1]]

Replies (1)

photo
1

Hi, in order to better assist you, could you give me an example of the action / function you are trying to build?

Thank you.

Greetings.

Ria.

photo
1

Basically, I would like to do is (refer to image):

If any one of [low] [moderate] [high] button is selected, [None] will be deselected/inactive state. And if all of the button is unselected, then [None] will active state.

Hope my explanation is clear :)

photo
1

Hello!

I have created an example of how you can activate and deactivate buttons by creating a style change event: The event: on mouse click - toggle change style (here you can change the color / text of the button). look at the interactions of the buttons of the singular selection since it has attached a change of the rest of the buttons to generate the conditional of a single selection.

Here are two examples of multiple selection and singular selection.

let me know if this information is useful to you.

Greetings.

Ria.

photo
1

Hi, I think you misunderstood. Or maybe I wasn't being clear.

This is how it should be:

Button 1 is in one group and button 2, 3 and 4 belongs to another group.

By default, button 1 is selected and the rest is unselected.

When either 2,3 OR/AND 4 is selected, 1 is unselected.

When 2, 3 AND 4 is not selected, 1 is selected

When.. [ [ Button2 = selected] OR [ Button3 = selected] OR [ Button4 = selected] ] DO [Button1 = unselected]

photo
1

Hello! I'm sorry for the misunderstanding, in response to the initial question:

"I have a nested OR condition but it seems that it automatically nested 2 of it (refer to attached image)"

The result is the same. They come out 'nested' because each function can only have two parameters but in the case of three 'or' it is the same if they were at the same level as if there are two 'nested' as the second parameter of the first.

I hope this information is useful to you.

Greetings.

Ria.

photo
1

Hi, apparently it did not give the desired results…

photo
1

I'm sorry to hear that, would you like to please attach your .vp so that I can take a look and see if I can better assist you.

Thank you.

Ria.

photo
1

Here you go, I've attached the sample file.

photo
1

Hello, I have reviewed your vp and in order to better assist you I would need to know if you want to keep the numbers at the top of each button and if you want only one button from the second group to be selected at a time.

I await the information.

Thank you.

Ria.

photo
1

Hi, please keep the numbers, and all the 3 buttons from the 2nd group can be selected at the same time.

photo
1

Hello, we have been able to reproduce what was intended by replacing the interactions in "on click", the "on Toggle": in the second click, it restores the original state without re-evaluating the conditions and this is what was generating the problem, here in the Example attached, pay attention to the action "onclick".

Let me know if I can help you with anything else.

Greetings.

Ria.

photo
1

This is awesome. Thank you!

Just wondering if this could be reproduce with the number at the top?

photo
1

hello,

If the action is the same, it can be reproduced, you can also copy it from the events tab and paste the interactions to another element.

I hope this information is helpful.

Greetings.

photo
Leave a Comment
 
Attach a file