0

For a report builder, my non-technical users need to be able to visually specify conditional text that is potentially multiple levels deep. Example:

Mr X and Mrs Y, each possibly replaced by Mr Z if the deal is signed after 4th January, hereby sell their 342 non-voting shares to Acme Inc.

This entire sentence may be subject to a condition (so that it may get removed from the paragraph if the condition is not met). But also within this sentence, several elements could be conditional, or replaced by alternative text depending on conditions. For example:

  • instead of Mr X and Mrs Y, we could be dealing with only one person, or instead four persons
  • the "each possibly replaced by Mr Z..." may get removed in its entirety
  • the "their 342 shares" could also be "his 24 shares" or "her single share"

And within those word groups even deeper conditionality may occur, e.g.

  • the "non-voting shares" may get removed, or replaced by "voting shares"
  • the "if the deal is signed after 4th January" may get removed or replaced by entirely different wording
  • even deeper, the "4th January" may get replaced by a description of the date, instead of a hard-coded date

Enabling users to visually select words and attach a condition or alternative text is not a problem for the first level. You can simply highlight those words and show a popup-editor to specify the condition and/or alternative.

The problem starts from the second level, where users need to be able to select words within other text that may itself be conditional or already replaced by other text. This seems difficult to express in line-based editors.

Are there any good suggestions, or existing software applications to learn from?

  • We have already explored the option of a domain-specific language, but it is too hard to learn for many non-technical users.
  • It could be envisaged to allow users to "drill down" on conditional elements (so they are only presented with elements of the current level), but I am afraid this is also complex for many users.

EDIT: To clarify, I'm not looking for advice on how to build a nested boolean editor (although that's an interesting problem by itself). Instead, I'm looking for advice/examples on how to visually present text and text-within-text-within-text that can become the "target" of some boolean condition.

The following example is one possible solution that I built myself, but it's kind of ugly, and users don't really like it.

Example editor

1
  • Looks pretty good to me, perhaps can just play around with the border size and color, to make it more subtle?
    – Ades
    Apr 6 at 3:24

1 Answer 1

0

You might look at some flow builder or rules engine patterns that support multiple levels of and/or conditions. In these patterns we often see the second level conditions indented or placed in their own container boxes to distinguish them from first-level conditions.

They can be fairly inline, like this example from FreshWorks:

FreshWorks flow builder example

They can also be canvas-based, like this example from ZenDesk:

ZenDesk workflow

You might want to bring engineering into the discussion to see what's technically possible.

1
  • Thanks for the useful tip, but I should have clarified in the question that I'm not looking for UX-advice on how to create a boolean condition editor (as the Freshworks example). What I'm looking for instead, is advice on how to position text-within-text on multiple levels. At some point you will obviously have to create the condition itself (which can have multiple nested AND/OR/NOT components), but that's an entirely different question.
    – mtruyens
    Mar 30 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.