Forum Discussion
DeveloperIgniti
14 days agoCommunity Member
Nested if conditions
Hi,
It doesn't happen often, but I occasionally want an if condition within another if condition.
Is this possible?
Many thanks in advance.
JeremyDittmer
13 days agoCommunity Member
If you want to accomplish this and can't just use multiple AND & OR conditions in the initial trigger there's a couple of options:
[1] Use the base trigger to open a new layer and then add a 'on timeline start' trigger(s) to the layer that uses your additional condition(s). Make sure to add a final 'on timeline start - hide layer' trigger so you can re-show the layer. You're kind of treating the layer as a re-useable function.
[2] Resort to Javascript! I'd need to see an example of what you want to check to suggest how best to code this. In general I would do something like:
- Set a true/false variable (let's call it 'jsResult') to false. You can also use numeric or string variables. Strings are most flexible but let's stick to t/f to keep it simple.
- Run the Javascript check & set jsResult to true if your condtions are met
- Add a 'when jsResult changes' trigger that carries out your desired action 'if jsResult = value true'
Does that make sense?
Related Content
- 1 month ago
- 1 year ago
- 6 months ago