MindManager Integrations 3: the logic revolution

In the third article in the MindManager integrations series I’ll explore how SmartRules can revolutionise the use of the program through the introduction of functions based on Boolean logic. 

Beefing up MM’s formula facility to include logic statements, most importantly IF-THEN functions like those found in Excel and many other programs, has long been on many people’s wish lists. This would allow users to compare aspects of topics, most obviously the data in topic properties, either with each other or to some other criteria.

The company has answered this request not by adding this feature to formulas but instead via an unusual route; the expansion of the SmartRules facility in MindManager 2019. Despite some shortcomings this is a surprisingly useful approach. 

SmartRules can accept a wide variety of inputs and not just topic properties. They can be nested like functions in Excel and can also combined with MM’s formula facility. And just as there is a range of inputs, there is a wide selection of formatting and other outputs. This makes the SmartRules feature and more specifically its IF-THEN functionality one of the most powerful tools available in MindManager.

The following example map was developed to illustrate of these techniques and is itself a work in progress as I continue to explore this functionality. I’ve hidden most of the “machinery”, including some topics and topic properties as well as the SmartRules and formulas involved, but I’ll come back to these later in the article.

A word of advice – this is a long and very technical read and assumes a reasonable level of experience with MindManager, some understanding of how SmartRules and formulas operate, and, ideally, familiarity with Excel formulas. If you haven’t done so already, it’s also worth having a look at the first article in this series which explains the basics of linking SmartRules and formulas, as well as the second which provided further examples.

What is an IF-THEN function?

The IF-THEN function is one of Excel’s most important and versatile tools. It is based on the concept of displaying a specific value and/or using that value in another function if a condition is met, or showing an alternative value – or no value at all – if the condition is not met.

A typical formula involving an IF-THEN function in Excel takes the form ‘=IF(A1=100,1)’ and contains two elements, and optionally a third:

  • The IF condition, or the comparison between two variables; usually this is the comparison of the value in a cell referenced in the formula (in the example above, A1) with a value supplied in the statement (in this example, the number 100), or between two values in separate cell references. In Excel, the condition uses one of the following as a basis of comparison; Equal (=) – as used in the example, Unequal (<>), Less than (<), Greater than (>), Less than or equal to (<=) or Greater than or equal to (>=).
  • The THEN value; the value that should be displayed if the condition is true (in the formula above this is 1).
  • The ELSE value; the value to be displayed if the condition is false. This value is optional; if left unspecified, an IF-THEN statement in Excel will return a FALSE. An IF-THE-ELSE version of the above formula would be ‘=IF(A1=100,1,0)’, where the ELSE value of 0 is shown if the value at A1 does not equal 100. Another IF-THEN statement can be substituted instead of an ELSE value and this “nesting” of functions can be repeated.The THEN and (if present) the ELSE values are often numbers which can be manipulated or used in other formulas. The ability to nest IF-THEN-ELSE statements also means that more complex scenarios can be developed. 

Simple IF-THEN statements will often show a simple True or False, or Yes or No, if the condition is met, or if it is not. For example, you could have a column of research data, sales figures or other statistics – and show if each of these has met, or failed to meet, a specific target. 

How can IF-THEN functions be used in mind maps?

Mind mapping has grown from its roots in brain storming, expanding into project management through the addition of task-oriented topics. In MindManager this has led to the development of topic properties as a way to add additional information.

The advent of formulas extended the usefulness of these properties, especially after the MAP add-in from Olympic Limited and later Mindjet added features to display a range of topic attributes and content as specific properties. This feature has been further improved in the MM2019 SmartRules facility, which allows just about any aspect of a topic to be shown as a topic property and manipulated via a formula.

SmartRules also provide a way to conditionally test values in topic properties, meaning that many of the things you can do with the IF-THEN function in Excel are available in MindManager. It is possible for example to automatically generate topic formatting, tags, icons and topic properties – and any combination of these – as effects, based on very specific criteria. 

Specifically, the ability to convert topic attributes to topic properties and then test them against criteria opens up a huge range of possibilities. The potential uses are endless, but include multi-factor risk assessment, development of complex project management dashboards, quantitative and qualitative analysis of documents and survey reports.

How do I use SmartRules as IF-THEN statements?

If you think about it, the whole notion of conditional formatting in MM is based on the IF-THEN function. In a SmartRule the trigger is the equivalent of the condition in an IF-THEN function, and the effect is the equivalent of the THEN value.

There is no ELSE value in a SmartRule, but much in the way that IF-THEN functions can be nested in the same equation in Excel, several triggers can be combined in each SmartRule while multiple SmartRules can be “stacked” to form complex statements (more on this later).

Working with the SmartRules syntax

While the basic structure of an MM SmartRule is the equivalent of an Excel IF-THEN statement, it is formatted somewhat differently.

The image above shows a typical SmartRule. There are two elements similar to an IF-THEN function, but each has two further components: 

  • The trigger. This is similar to the condition, the IF part of an Excel IF-THEN function, and comprises the following:  
    • The type of condition being evaluated. In an MM SmartRule there are around 20 possible triggers; nearly half of these relate to task properties while others include tags, icons, the number of attachments, links or subtopics, aspects of a topic’s location, topic text or its properties (in the example above the type is the TestTag group of tags).

    • The condition itself. The type of comparison being made and value being compared. Like Excel, SmartRules offers the standard arithmetical options (plus, minus, does not equal, etc), but also contains alternatives such as Contains, Does Not Contain or Is Exactly to deal with non-numeric values such as icons or text in tags or in topics (in the example above the condition is whether the TestTag trigger contains the tag T1)
  • The effect. This is the equivalent of the THEN part of an Excel IF-THEN function, but like the trigger has two elements:
    • The type of effect being applied. Again, there are around 20 potential types of effect, around half relating to topic formatting such as fill or font colour. Other options include adding tags, icons and, most importantly, topic properties (in this example the effect is a topic property).

    • The actual effect being applied. Again, the options available vary with the type of effect. In the case of fill colour, you would choose the specific colour, in the case of a tag the specific tag to be applied – and obviously for topic properties, a specific value (in this example, the number 1 will be placed in the topic property).

Stacking SmartRules

One advantage of the SmartRules approach is how easily both the elements of a single rule and the rules themselves can be nested, or stacked. There are three approaches to this, the first two of which can be applied within a single rule: 

  • Multiple triggers: These can be added and applied either when ALL conditions (the equivalent of Excel’s AND function) are met or when ANY conditions are met (the equivalent of an OR function). This means that either very precise or quite broad conditions can be set.
  • Multiple effects: when the trigger condition is met (or multiple ones applied) a range of effects can be applied; for example, a topic can coloured, a tag applied and a topic property generated within a single SmartRule based on the same criteria. The following example rule and map demonstrates the use of both multiple triggers and effects being applied in the same SmartRule:

  • Multiple rules: The third type of stacking is when multiple rules are created based on the same triggers and applying similar effects. Each successive rule acts as the equivalent of the optional ELSE portion of an Excel IF-THEN function; i.e., what to show if the IF-THEN statement is false. The following example SmartRules set illustrates this.

In the above example each SmartRule has been set so that each trigger covers a specific population range: 0-499, 500-999, etc, and applies a smart fill.

Using SmartRules with formulas

The IF-THEN function is not the only thing missing in MindManager formulas; beyond basic arithmetic operations, the only functions available are SUM, AVERAGE, MIN, MAX and COUNT. However, the ability to combine SmartRules and formulas does bring the former’s IF-THEN capability into the heart of the latter.

Once SmartRules are used to create topic properties with numeric values as effects, all the available formula functions can be applied to them, and not just within the current topic or branch. This is because MindManager supplies a useful set of ranges, the equivalent of Excel’s cell ranges, to specify exactly which topic properties the formulas involve, as shown in the Formula Topic Range dialogue box:

Specific topics can also be chosen using the Select Topic button, which means that formulas can be applied very selectively. This feature can also be used simply to reference a topic property, including a SmartRule effect or formula result in another topic, for example if you want to set up a floating topic as an index or dashboard summarising key outcomes in the map.

Key limitations and issues

The syntax of a SmartRule is clearly different to an Excel IF-THEN statement and imposes some limitations. I’ve already dealt with a few of these – the use of “stacked” SmartRules as a way of providing the “missing” ELSE component, for example, but there are some other issues and limitations.

Comparing Variables

The most obvious is that unlike an Excel IF-THEN statement, SmartRules do not provide the capacity to directly compare two variables, as opposed to a variable and a value provided directly in the formula. So, for example, you can have the equivalent of ‘=IF(“Sales”=100,1)’, in a SmartRule, but not ‘=IF(“Sales”=”Costs”,1)’.

The solution is however relatively straightforward – compare the variables arithmetically first through a formula, and then apply a SmartRule to the result. There are two ways to do this – either divide one variable by the other (i.e., “Sales”/”Costs”), or subtract one from the other (“Sales-“Costs”). 

In the first example, if the two variables are equal the answer is obviously 1, while in the second the outcome would be zero. One or more SmartRules could then be used to generate topic properties or other effects depending on the outcome.

Transferring information between topics

SmartRules effects can be applied only directly to the topics which meet the SmartRule conditions; it is impossible to specify a SmartRule which will apply an effect on Topic 1 because a topic property in Topic 2 meets the trigger criteria. This can be overcome by using SmartRules to generate topic properties which can be referenced by formulas attached to other topics.

Topic Property Types

While SmartRules will work with a variety of topic property types and formats including text, formulas recognise only topic properties with numeric formats. This also applies to topic properties attached to other topics and referenced in formula topic ranges. A SmartRule must be used to “convert” non-numeric properties into numeric ones for them to be accessed by a formula, a process which makes working with text-based topic properties across multiple topics somewhat cumbersome.

Linking multiple topics

The differing structure and syntax of SmartRules and formulas has some advantages but can make their use together a bit of a challenge. It is possible to link topics together to make sophisticated calculations via combinations of formulas and SmartRules, but the potential to make mistakes obviously increases with complexity.

Editing, adding or deleting topics or topic properties at any point in this chain is likely to result in an error message or return an incorrect result. There also appears to be some upper limit on the ability to “daisychain” multiple topics using this method, but I’m still investigating this.

Unpacking the example

I’ll return to the map I started with. This is its compact form:

And here it is fully expanded:

Unfortunately there isn’t sufficient space to fully describe this map, but I’ll discuss some selected portions. The map shows stationery sales for the four branches of a hypothetical stationery company that sells only paper, pens and pencils, along with a performance summary. Sales are totalled for each branch along with the costs; based on this a profit/loss figure is calculated and branch profitability calculated at the branch level. The following shows the formulas involved:

At the central topic level the best performance and worst performance in terms of profitability are calculated, using the following formulas:

The separate topics above the central topic are used to compare individual branch performance with the best and worst performances to establish which belongs to which branch. Both a branch name and number are generated using the following SmartRules:

This roundabout approach is required because as described earlier the only way to compare to variables is not with an IF-THEN statement but by dividing or subtracting them (in this case division has been used). The branch number is required to identify the branch in the Performance Summary, which has an extensive suite of formulas linking it to the central topic and the topics calculating best and worst branch performance:

These formulas are combined with an extensive set of SmartRules. I’ll just highlight the four which supply the appropriate branch name based on the branch number identified in the Best Branch Performance topic. Obviously only one number will be a match, in which case the appropriate branch name is shown:

Despite the length of this article I feel that I’ve only scratched the surface of the potential that SmartRules and formula integration provides. I may return to this topic at a later date but in the meantime I’d welcome any feedback readers may have on their experience in using this feature, as well any questions you may have.

 

 

 

This entry was posted in Mind Mapping, MM2019, Project Management and tagged , , , . Bookmark the permalink.

Leave a comment