Smart Rules - using Progress and Priority to set a tag
Discussion Open
I want to use Smart Rules to set Kanban tags using progress and priority. It works fine provided I set values for both progress AND priority but I would also like to set a Kanban tag if only one progress or priority value has been specified.
I would usually code something like this with an If... Elsif....Else logic or in Excel conditional formatting use the stop if true on a condition
I see you can alter the order of the Smart Rules. Does the code stop at the 1st smart rule that acts?
I haven’t got my computer in front of me at the moment so I can’t set this up to see how it would work. However, since both priority and progress are numbers, one option would be to use logical and comparison operators in a formula to set up the equivalent of a nested set of if - then statements. You could then use the formula outcome to set the trigger for the SmartRule to apply the relevant tag. See my article on this: https://sociamind.com/2021/03/28/logic-time-and-money-more-mindmanager-formula-surprises-part-2/
I haven’t got my computer in front of me at the moment so I can’t set this up to see how it would work. However, since both priority and progress are numbers, one option would be to use logical and comparison operators in a formula to set up the equivalent of a nested set of if - then statements. You could then use the formula outcome to set the trigger for the SmartRule to apply the relevant tag. See my article on this: https://sociamind.com/2021/03/28/logic-time-and-money-more-mindmanager-formula-surprises-part-2/
Alex G left a helpful comment ....
since both priority and progress are numbers, one option would be to use logical and comparison operators in a formula to set up the equivalent of a nested set of if - then statements. You could then use the formula outcome to set the trigger for the SmartRule to apply the relevant tag. See my article on this: https://sociamind.com/2021/03/28/logic-time-and-money-more-mindmanager-formula-surprises-part-2/
This goes part way to a solution however it appears the formulae would have to be set up in every topic, sub topic and item in order to assign each item to a Kanban Tag. For the topics it's treat as I can use Ranges to set up values in topic headers based on the descendents but for all the individual tasks it looks a pain.
Can Formulae be configured to run on every item in a similar way to SmartRules?
Alex G left a helpful comment ....
since both priority and progress are numbers, one option would be to use logical and comparison operators in a formula to set up the equivalent of a nested set of if - then statements. You could then use the formula outcome to set the trigger for the SmartRule to apply the relevant tag. See my article on this: https://sociamind.com/2021/03/28/logic-time-and-money-more-mindmanager-formula-surprises-part-2/
This goes part way to a solution however it appears the formulae would have to be set up in every topic, sub topic and item in order to assign each item to a Kanban Tag. For the topics it's treat as I can use Ranges to set up values in topic headers based on the descendents but for all the individual tasks it looks a pain.
Can Formulae be configured to run on every item in a similar way to SmartRules?
You can set this up using SmartRules only, but a lot depends on what you mean by "progress value".
Setting up a SmartRule to test for topics that have only a Task Progress icon but which are completely absent a Task Priority Icon is straightforward because you can use the "Does Not Exist" test, as follows:
However, setting up the reverse (ie, to test for topics with a Task Priority icon but no Task Progress one) is not as straightforward because there is no equivalent Does Not Exist criteria available for the Task Progress trigger, and you must supply a value from 0% upwards.
Therefore, if by no Task Progress you want to flag tasks which have any Trask Priority icon but a Task Progress value of zero only you can then set up a matching rule which would be as follows:
Therefore, applying both roles means that you end up flagging all tasks which have any progress icon but no priority icon at all AND all tasks which any priority and a progress of 0% only.
If however you want to tag tasks with any Task Priority tag but literally no Task Progress tag at all, things get a little trickier. The best way I can find to do this is to set up a SmartRule that flags all tasks with any Task Progress - and by "flag", I mean applying a flag, icon, tag, topic property or some other task attribute to these tasks. The rule would be something like this (I'm using an icon):
You would then modify the No Progress SmartRule to look for tasks which have any Task Priority AND where the Progress icon applied by the Progress SmartRule does NOT exist, like this:
The order of SmartRules is also important. This seems to work best:
This is an example map in which these rules have been applied. Topics with either a Task Progress OR a Task Priority icon have been given a Kanban tag, while those which have either both Progress AND Priority icons or which have neither icon have been ignored.
PS: When I get the chance I'll play around with formulas to see if that approach is more or less effective.
You can set this up using SmartRules only, but a lot depends on what you mean by "progress value".
Setting up a SmartRule to test for topics that have only a Task Progress icon but which are completely absent a Task Priority Icon is straightforward because you can use the "Does Not Exist" test, as follows:
However, setting up the reverse (ie, to test for topics with a Task Priority icon but no Task Progress one) is not as straightforward because there is no equivalent Does Not Exist criteria available for the Task Progress trigger, and you must supply a value from 0% upwards.
Therefore, if by no Task Progress you want to flag tasks which have any Trask Priority icon but a Task Progress value of zero only you can then set up a matching rule which would be as follows:
Therefore, applying both roles means that you end up flagging all tasks which have any progress icon but no priority icon at all AND all tasks which any priority and a progress of 0% only.
If however you want to tag tasks with any Task Priority tag but literally no Task Progress tag at all, things get a little trickier. The best way I can find to do this is to set up a SmartRule that flags all tasks with any Task Progress - and by "flag", I mean applying a flag, icon, tag, topic property or some other task attribute to these tasks. The rule would be something like this (I'm using an icon):
You would then modify the No Progress SmartRule to look for tasks which have any Task Priority AND where the Progress icon applied by the Progress SmartRule does NOT exist, like this:
The order of SmartRules is also important. This seems to work best:
This is an example map in which these rules have been applied. Topics with either a Task Progress OR a Task Priority icon have been given a Kanban tag, while those which have either both Progress AND Priority icons or which have neither icon have been ignored.
PS: When I get the chance I'll play around with formulas to see if that approach is more or less effective.
Thank you Alex, I'll see if i can achieve what I want with this. If I need formulae too, is there any way to apply a formula globally? I really don't want to have to put in 6 lines of formulae into each topic. Perhaps Macros could work better.
Thank you Alex, I'll see if i can achieve what I want with this. If I need formulae too, is there any way to apply a formula globally? I really don't want to have to put in 6 lines of formulae into each topic. Perhaps Macros could work better.
Hi Paul,
You don't have to write formulae into each topic manually. You can write the formulae on a single topic, then copy the topic properties and paste these as properties into all the relevant topics.
Having said that, I have found that trying to set this up entirely using formulae is surprisingly difficult, for two reasons. First, while MindManager formulae have AND and OR operators, they lack a true XOR. There is a way around this, but the second problem is that if you try to use a Task Attribute in a formula you will always get a numeric result whether or not the task attribute exists.
The easiest thing to do is to use SmartRules to test for the existence of all Progress and Priority. First, select a task and create Progress and Priority numeric Topic Properties. Then set up a Progress SmartRule with something like the following:
And similarly test for the existence of Priority with this:
The The Progress Topic Property should automatically appear on those topics which have and Progress icon, and similarly for the Priority Topic Property. Those tasks which have both will get both properties, and those with neither will get none.
Then you need to select a topic and add the following formula: [Todo]=[Progress1]!=[Priority1]. This will return a 1 only when the there is either a Progress or a Priority; if both are present or none are present, it will return a zero. You then need to copy the ToDo Topic Property to all the relevant tasks. Finally you need to add another SmartRule to apply the relevant Kanban tag to all tasks where the ToDo topic property is equal to 1.
Hi Paul,
You don't have to write formulae into each topic manually. You can write the formulae on a single topic, then copy the topic properties and paste these as properties into all the relevant topics.
Having said that, I have found that trying to set this up entirely using formulae is surprisingly difficult, for two reasons. First, while MindManager formulae have AND and OR operators, they lack a true XOR. There is a way around this, but the second problem is that if you try to use a Task Attribute in a formula you will always get a numeric result whether or not the task attribute exists.
The easiest thing to do is to use SmartRules to test for the existence of all Progress and Priority. First, select a task and create Progress and Priority numeric Topic Properties. Then set up a Progress SmartRule with something like the following:
And similarly test for the existence of Priority with this:
The The Progress Topic Property should automatically appear on those topics which have and Progress icon, and similarly for the Priority Topic Property. Those tasks which have both will get both properties, and those with neither will get none.
Then you need to select a topic and add the following formula: [Todo]=[Progress1]!=[Priority1]. This will return a 1 only when the there is either a Progress or a Priority; if both are present or none are present, it will return a zero. You then need to copy the ToDo Topic Property to all the relevant tasks. Finally you need to add another SmartRule to apply the relevant Kanban tag to all tasks where the ToDo topic property is equal to 1.
Thank you, I'll try that.
Thank you, I'll try that.
Hi guys, thank you for the question and the discussion.
This is a great example how important a further development of the SmartRules is!!!
SmartRules are great and needed by everyone. Please MindManager go on with he development on the SmartRules.
Thank you!
Best, Andreas
Hi guys, thank you for the question and the discussion.
This is a great example how important a further development of the SmartRules is!!!
SmartRules are great and needed by everyone. Please MindManager go on with he development on the SmartRules.
Thank you!
Best, Andreas
---