BrianB
BuildShip17mo ago
12 replies
Brian

Using Switches/Branches Variables after their expression

I would like to know how I can use variables from switches or branches after their execution.

You can see in the attached image that I tried it with an OR expression to either use the first switch case or the default switch case, depending on which were executed. This works if it goes through the first case but fails when it goes through the second case, because the OR condition checks the first case first.

The reason why I am not setting up the GPT4-Vision within each switch case is because I have a lot of nodes that come after the switch case and they would all be the same. The only difference would be the GPT4-Vision prompt with the according variables from switch case 1 and the default case.

How can I solve this issue?
Screenshot_2024-09-05_at_09.28.42.png
Solution
Hey, I missed updating the remix link, here is the correct version - https://buildship.app/remix/56ca7d42-f1ed-4cca-bd5b-0b13153185ef.
with the updated logic. This should work. @Brian
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
BuildShip - Visual backend workflow builder
Was this page helpful?