Test for resultValue or resultValueX

To ‘X’ or not to ‘X’, that is the question:
Whether ’tis nobler testing ‘text’ with resultValueX
To check against the description of an item in a list
Or, with resultValue, check just the id
And, if it changes, still obtain the required result?

Actually, there is no need for drama …

resultValueX tests against the text of a result and resultValue tests against the id of the result.

To give a bit of context …

Both of these tests are used primarily in Display Conditions.  Display Conditions are used on template items to show or hide a question depending on what has been entered previously.

For example, if a list includes an ‘other’ option which requires additional text entry, it may be undesirable to make a permanent text box.  A test can be added to the text box so that it is only displayed if ‘other’ is selected from the list. 

This blog discusses whether to test against the text (‘other’) or whether to find the id of the list item (from the List Items menu item) and test against that.

Use resultValueX (or rVX) if the text is static

  • if you have a straightforward answer such as ‘yes’, ‘no’, ‘n/a’.  This helps if you change to a different list that might contain just ‘yes’ and ‘no’ or ‘yes’, ‘no’, ‘n/a’ and ‘don’t know’.
  • if you have more than one potential answer and want to use the ‘contains’ test type,
    • such as product codes that start the same eg ABC1234 and ABC5432 where resultValueX;uniqueName;contains;ABC will select all codes containing ABC, allowing a prompt to be shown for a particular supplier.
    • yes/no type answers with extensions eg yes – once a week, yes – daily, no, n/a where one might use resultValueX;uniqueName;contains;yes to weed out no and n/a so a ‘further details’ text box might be added.
Use resultValue (or rV) if your text is long or might change whilst maintaining the same basic meaning

  • ideal for audits where standards are updated regularly eg
    • ‘complies to COSHH 2015’ might change to 2018
    • standards of pressure, temperature, team working etc might also change
  • use where wording is evolving
    • if operatives are misinterpreting a question it may need to be re-worded
    • if management want to change parameters
  • where timescales or other working practices might change
  • where questions are long and cumbersome to fit into the Display Conditions box.

 

This also applies to other conditional places in magic5 where resultValue is applicable.

For further information, see

If you are using the new magic5 UI, your list item id will appear something like this …

Contact Us