I have a button text that I want to change according to the status of a variable.
If status = A, I want the text to show “text A”.
If status = B, I want the text to show “text B”
If status is anything else, I want the text to show “text C”.
How do I do this?
I’m trying to use the “IF” no code formula but I can only make it such that if it’s A, show text A, if its everything else, show text C. but the system doesn’t take into account B. I’ve also tried having “and” between 2 IF statements which I thought was working but it doesn’t show correctly too.
What formula should I be using for “multiple if” conditions?
from my point of view, i’d use javascript for this * because* it’s a simple operation and the no-code method doesnt allow for this easily. I suppose you could create a variable that is for that text element. when an option is updated int he app, you could use the multi-option split operation and set a variables value to display accordingly
Edit : But be careful, if one of your value is falsy (0, “”, null, false), it will return the defaultValue instead, so you can do that trick only if you have no falsy values in your switch
So if URL contains “cow”, I want it to return 1.
If URL contains “dog”, I want it to return 2.
If URL does not contain either, I want it to return 3 as default value.