Expand my Community achievements bar.

Join us LIVE in San Francisco on November 14th for Experience Makers The Skill Exchange. Don't miss out on this free learning event!
SOLVED

Adobe Fusion Switch Module

Avatar

Level 1

I am attempting to use the Adobe Fusion switch module. I feel like it is not working properly but the documentation on how it works is pretty lacking.

 

If I have a Case that evaluates to true; I assume the output of the switch module would be the output for that case. However it seems my switch module always outputs the else regardless of whether there is a case that is evaluating as true. Can anyone explain how this is supposed to work?

 

Case 3 is true, why is is else true?Case 3 is true, why is is else true?

1 Accepted Solution

Avatar

Correct answer by
Employee

The case and pattern needs to match like for like so the switch is looking specifically for 'Email - Pillar' in the patterns. The Input that the switch is assessing is the variable, not the cases.

 

Each case is 'If Pattern=Input; Output'. The switch is seeing the word 'true' or 'false' in your example to compare to 'Email - Pillar'.

 

Example in images assessing the day of the week.

 

Assess Today.pngAssess today Output.pngAssess Friday.pngAssess Friday output.png

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

The case and pattern needs to match like for like so the switch is looking specifically for 'Email - Pillar' in the patterns. The Input that the switch is assessing is the variable, not the cases.

 

Each case is 'If Pattern=Input; Output'. The switch is seeing the word 'true' or 'false' in your example to compare to 'Email - Pillar'.

 

Example in images assessing the day of the week.

 

Assess Today.pngAssess today Output.pngAssess Friday.pngAssess Friday output.png

Avatar

Level 1

Thanks for the reply. I did come to this realization shortly after I posted. I was conflating the true false result with the outcome of the pattern match. The module expects the result of the case to be a pattern. To solve my issue I used an if statement that when evaluated to true outputs the desired pattern instead of true/false. Not the most elegant method, but I could not find another way to do this in a single module.