Skip to main content

I want to make a follow along type flow chart for some big processes where after user selects a “Yes” or “No” decision, subsequent steps in the flow chart are displayed or highlighted and user can keep going down that flow. Is it possible on Lucid Chart?

Yes, this is definitely possible with some creative formulas. Let me ask a question first. Are you looking for all paths to be color-coded to the decisions, or only the selected path.
All paths:

Only the selected path:


Or something that is different from both of these?
I linked the documents that I built these on. Feel free to explore them and see if you can get what you want working. If you need more explanation of what I did, I’m happy to explain more. I’d rather only explain the one you want because they’re complex, so I asked first. 😅


It was the second one, thank you for the help. I had another follow up question - Is there a way where I can send the second chart in “View only” mode to my stakeholders and they can still select the Yes or No buttons from there and the chart gets highlighted? I tried this but in view mode or presentation mode I can’t interact with the yes/no buttons.


No, there isn’t a way to use the second chart in “View only” mode or build any diagram in Lucid that view only users can interact with. The Yes or No buttons are normal shapes (from the UI Input shape library), so they require Edit access to interact with.

If you decide to use this anyway, would you like a description of the formulas and conditional formatting I used to set it up?


Yeah that will be helpful

 


Alright, there are two main parts to this one, which are a single conditional formatting rule and the use of the UI Input shape.

Here is the formatting rule I used:

=NOT(IN(MAP(FLATARRAY(thisUPSTREAMDEEP), x => UPSTREAMLINES(x) = UPSTREAM(UPSTREAM(x)).$selectedvalue), false))
I’ll explain the different parts, and I’ll err on over-explaining because I don’t know how much you already know.
  • UPSTREAM: Gets an array of all objects where a line is drawn from that object to the current object. Only gets 1 level up.
  • UPSTREAMDEEP: Does the same as UPSTREAM but recursively, so it gets everything upstream.
  • UPSTREAMLINES: Gets all lines attached to the current shape where the line was drawn from another shape to the current one. Only gets 1 level up.
  • FLATARRAY: Creates an array from the inputs, but if an array is an input, it will get the values from the array, not the array itself. (i.e. FLATARRAY(1, F2, 3]) returns 1, 2, 3]. ARRAY(1, 32, 3]) returns 1, 2, 3]].)
  • MAP: Takes all values in the first input array and applies the function in the second input.
  • IN: Checks if the first input contains the second input.
  • NOT: Returns true if the input is false. Returns false if the input is true.
  • $selectedvalue: This is a property of the UI Input shape UI2RadioBlock that returns the text in the selected option.

Note that all of the “upstream” functions kind of return both the object and the text on the object at the same time depending on what you do with it. I’m using UPSTREAMDEEP to get objects upstream, then getting the UPSTREAMLINES on those objects, which is fine. But I’m using UPSTREAMLINES to compare the text on it to something else.

So, I’m checking for each upstream shape including the current shape if the upstream lines connected to that shape have the same text as the selected option on the radio shape up two levels. In this example, the Process block on the blue path is blue because the text on the upstream line connected to it (“Yes”) matches the selected option 2 levels up (because of the UPSTREAM(UPSTREAM(x)).$selectedvalue). The white process block’s upstream line text does not match.

Note that this requires the radio input shapes to be connected to the decision block. You can turn that line invisible if you want to hide it.

However, most shapes do not have the radio block two levels up from them, so UPSTREAM(UPSTREAM(x)).$selectedvalue won’t return anything. For that reason, I’m checking if anywhere upstream (UPSTREAMDEEP) has a block where that check returns false (the IN function). If nowhere returns false (the NOT function), that means along the entire path, there is never somewhere the path to the current block was not chosen. This also specifically leaves open paths where no option has been chosen yet. And I apply the blue coloring to those shapes.

Finally, I added an Or condition to the formatting rule just to turn the first shape in the path blue. It will turn any shape that doesn’t have any shapes upstream blue unless they’re the radio input shape.

I hope that all made sense to you and anyone else who decides to read this. 🙂 Let me know if you have questions.


Reply