Skip to main content
iammai
June 22, 2023
Question

'Change to' with conditional action not working

  • June 22, 2023
  • 66 replies
  • 7357 views

When based on a conditional I want the component variant to change to another one (depending on the conditional), it doesn’t let me choose it to go to two different change-tos. If I change one of them, it changes the other one immediately.

I would upload image or video but I can’t as I am a new user. But basically to replicate this:

  1. Create 3 variants of a component (eg a number 1, 2, and 3 in a frame, and make them into component variants, let’s say the prop is either 1, 2, or 3)
  2. Create a variable (eg. next that is 3)
  3. From variant 2, create an on click interaction that has a conditional:

if (next == 3){
change to props = 3
}
else{
change to props = 1
}

What you will see is that when you create the second change to, it is automatically set to props = 3, and if you try to update the second one to props = 1, it will change the first one to props =1 as well.

This topic has been closed for replies.

66 replies

iammai
iammaiAuthor
July 18, 2023

Thank you!

WillBarrow
July 20, 2023

Definitely a bug. There are other related posts

MMM
July 20, 2023

image
I’ll attach a screenshot for clarity.

WillBarrow
July 20, 2023

I’ve since discovered that the reason I couldn’t select a variant in my “Change To” dropdown was because I had placed the click action on an already interactive button component (even though there was no existing click action, but that’s another matter). Once I wrapped my button component in another frame and applied the action to that, I was able to set the Change To option. Like everyone else here, however, I’ve been unable to add an Else Change To action or even a second Conditional with a Change To action without it changing and breaking the first Change To action.

WillBarrow
July 21, 2023

A workaround that I’m using until these conditionals get fixed is to create a separate, hardwired button for each of my “conditions” and tie each button to a boolean variable. Then I just need to set true/false for each button-variable on the navigation action that would otherwise set my conditions. I hope that makes sense and helps someone out.

Allison_Woo
July 27, 2023

@WillBarrow LIFESAVER - i was struggling with how to use a an interactive variant (a checkbox) to control a string variable with the conditional interaction and it just wasn’t working. ended up having to tie two buttons with different texts (that i was trying to use the string variable for) to boolean variables and then use conditional interaction to tie it to the checkbox 😭

July 28, 2023

I am having the same issues.
I cannot change the state here in the conditional interaction.

Angel_Claudio
August 14, 2023

Having the same issue:

Jake_Moore1
August 14, 2023

Yep, can corroborate that this is still broken. Submitted a thread a few days ago: Can't use conditional interaction inside interactive component

Hampus_Svallfors
August 15, 2023

Same here.
Aug-14-2023 19-29-06