Can we get "if" rule trees to stay legible?

Can we get the IF statement trees to be cleaner and not automatically shrink in half every iteration? I understand it looks a little more intuitive, but after a few ifs its unusable. I have 12 Ifs i need to iterate through based on a flow and after 4 its pretty much no usable.

Id use less ifs but that would require significant work elsewhere, so this is the best i can do. if/when we can choose a variable based on another parameter, my flow would be just one step.

attached screenshots



I’ve run into this and agree that nested IFs get cluttered. Each time I’ve run into this I’ve also realized I could restructure my rule better. You shouldn’t need the nested IFs in your case though, right? Seems like you could do one after another in the main flow for the same effect.

1 Like

I could use then—if/then----if/then… but that just results in the same mess on the THEN side as opposed to the ELSE side. same problem.

I mean all the IFs at the same level.

  • IF a = 1
    • THEN (action)
    • ELSE (blank)
  • IF a = 2
    • THEN (action)
    • ELSE (blank)
3 Likes

ahhh I gotcha. yes that works.

thank you very much

1 Like

I was not even able to set a value for a device action after only second nested if - I could not get into the field. am I missing something? is there a cli for this that would be easier to create nested if’s?

You can shrink the browser width to mobile width and the if conditions stack on top of each other making it easier to manipulate nested conditions.

1 Like

We’ve released a new IF-Then-Else design that better handles nested IF conditions! to beta and are looking for feedback on it.

:tada:Introducing Vertical Stacking for IF Conditions!

Beta Link: https://community.sharptools.io/t/beta-enhanced-design-for-nested-if-conditions/13103

This new design stacks the Then and Else blocks for an If Condition on top of each other rather than side-by-side. This mimics what you previously saw on mobile devices with two further enhancements:

  • Each level of nested IF Condition gets a new color assigned to it to help visually distinguish what ‘level’ you are at
    • The icon in the top-left of each If, Then, Else, and Condition block at the same level share the same color to further visually group related items
  • The Then and Else blocks are indented with a color-matching vertical bar shown to the left to better visually group conditions and their actions

3 Likes

This feature is now available!

:tada: Introducing Vertical Stacking for IF Conditions!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.