Visit Boris website Use display conditions to show/hide items or sections
Before you start
  1. Which parts of the template do you wish to conditionally show or hide? Identify the areas that are cluttering up the forms on the device and may be used only on rare occasions.
  2. Is there a simple condition that can be used to decide when it needs to be available to the device user? Write a list of the occasions on which they are required (or not required) and look for common conditions.  Simplify the condition including assessment on whether it should apply to showing or hiding.  Identify whether the condition applies within the template or as an external action - in other words is it better to show/hide part of this template or would it make sense to use a template action to create a summary form or new form.
  3. Do you wish to apply any conditions to the report? Apply similar considerations for occasions when parts of the report will or will not be required.
Why would I use wish to show/hide item sections?
Common uses include
  1. De-clutter device screens for normal situations to improve speed of data collection
  2. Guide device users through which prompts need to be filled in to improve the accuracy of data collection
  3. Provide concise and focussed reports for your customers or for your own records
Overview
  1. Step 1. Identify all the internal ids and unique names.
  2. Step 2. Open the setup for the part that is to be hidden/shown
  3. Step 3. Type in the condition.
  4. Samples 1. Evaluated on the device
  5. Samples 1. Evaluated on the server
Step 1. Identify all the internal ids and unique names
  1. Internal ids and/or unique names will be required in the conditional statement. It will help if these are written down for reference as they need to be replicated exactly and are case sensitive.
  2. Many conditions rely on knowing the internal id for list entries. To make this easier they are shown in the list entries list.
  3. Unique names are also important in creating conditions.  Creating meaningful ones will be helpful for future amendments or for reading the conditions that you are about to set up. They usually appear in the Advanced tab of an item but may be elsewhere in some cases.
Step 2. Open the setup for the part that is to be hidden/shown
  1. This will be either:
    1. An item type (evaluated on the device)
    2. A section in a template (evaluated on the device)
    3. A template action (evaluated on the server)
  2. All of these are available through Setup/Maintenance->Maintain Templates->[your template name]
  3. The conditions are entered on the tab called 'Display Conditions (advanced)' or just 'Conditions (advanced)'.  There are usually 2 conditions that can be attached to an item which enables both a true and a false condition to be set up.
Step 3. Type in the condition.
  1. The standard format for a condition is:

    conditionType;uniqueName(or attribute or id);testType;valueToTest
  2. conditionType

    1. Evaluated on the device
      • resultValue – test the result of (ie data entered in) an item on the form
      • workOrderValue – test the value of an item in the associated job sent from the server
      • customerAttribute – test for an attribute of the current customer
      • locationAttribute – test for an attribute of the current location
      • buttonSequences – test for whether a sequence of action buttons on the form have been activated
      • listItemAttribute – test for an attribute of a list-based answer on the form
    2. Evaluated on the server
      • resultValue – test the result of an item on the form
      • customerAttribute – test for an attribute of the current customer
      • locationAttribute – test for an attribute of the current location
      • hasFollowUp – test for whether the current form has associated follow-up actions
      • hasOutstandingFollowUp – test for whether the current form has outstanding follow-up actions
      • hasJob – test for whether the current form is associated with a job
  3. uniqueName(or attritute or id)

    This refers to the thing that is to be evaluated, whether in the template or in the job definition.  It might be the unique name, an internal id or an attribute (see Concepts - Attributes for more details). Be aware of the following:
    • Device-side tests on list entries use the list entry id, whilst the server-side uses the list entry text.
    • Attributes are either standard or bespoke.
    • Unique names are case sensitive so make sure the capitals are in the right place.
  4. testType

    This is the type of test you’re doing. You can use:
    • equals – test for a specific value
    • notequals – test for the value not being the specified one
    • empty – test for whether no value is present
    • notempty – test for whether any value is present
    • isoneof – test for a number of values (separate each value with a comma)
    • morethanxdaysagoorempty – test whether a date item has a value more than the specified number of days ago (or it’s empty)
    • complete – test whether a sequence of action buttons has been fully completed
    • incomplete – test whether a sequence of action buttons is incomplete
  5. valueToTest

    This is the answer to test against.
    • For a tick/checkbox it needs to be Yes or No
    • For text-based answers it’s just the text
    • For list-based answers on the device, use the internal Id of that list entry
    • For list-based answers on the server, use the text of the list entry
Samples 1. Evaluated on the device

With reference to the list above, the item to which the condition is attached will only display if ...
  1. resultValue;visitStatus;equals;5993
    looks for the “visitStatus” item on the form having an answer of “Await parts”
  2. resultValue;visitStatus;isoneof;5993,5992
    looks for the “visitStatus” item on the form having an answer of “Await parts” or “Re-visit”
  3. resultValue;visitStatus;notequals;5991
    looks for the “visitStatus” item on the form not having an answer of “Complete”
  4. resultValue;revisitRequired;equals;Yes
    looks for the “revisitRequired” tick/checkbox being ticked/checked
  5. resultValue;lastVisit;morethanxdaysagoorempty;100
    looks whether the “lastVisit” date item is more than 100 days ago
  6. customerAttribute;haveBankDetails;equals;No
    looks for the “haveBankDetails” attribute of the current customer being “No”
  7. locationAttribute;isSpecialContract;equals;Yes
    looks for whether the “isSpecialContract” attribute of the current location is “Yes”
  8. listItemAttribute;fittingType:isSpecial;equals;Yes
    looks for whether the “fittingType” list item selected has its “isSpecial” attribute set to “Yes”
  9. workOrderValue;warrantyType;equals;1234
    looks for whether the “warrantyType” specified in the job is a list entry with id 1234
  10. locationAttribute;isSpecialContract;equals;Yes
    looks for whether the “isSpecialContract” attribute of the current location is “Yes”
  11. listItemAttribute;fittingType:isSpecial;equals;Yes
    looks for whether the “fittingType” list item selected has its “isSpecial” attribute set to “Yes”
Samples 2. Evaluated on the server- The item to which the condition is attached will only display if ...
  1. resultValue;visitStatus;equals;Await
    parts looks for the “visitStatus” item on the form having an answer of “Await parts”
  2. resultValue;visitStatus;isoneof; Await parts, Re-visit
    looks for the “visitStatus” item on the form having an answer of “Await parts” or “Re-visit”
  3. resultValue;visitStatus;notequals; Complete
    looks for the “visitStatus” item on the form not having an answer of “Complete”
  4. resultValue;revisitRequired;equals;Yes
    looks for the “revisitRequired” tick/checkbox being ticked/checked
  5. resultValue;lastVisit;morethanxdaysagoorempty;100
    looks whether the “lastVisit” date item is more than 100 days ago
  6. customerAttribute;haveBankDetails;equals;No
    looks for the “haveBankDetails” attribute of the current customer being “No”
  7. locationAttribute;isSpecialContract;equals;Yes
    looks for whether the “isSpecialContract” attribute of the current location is “Yes”
  8. hasFollowUp;;equals;True
    looks for whether the current form has follow-up actions
See Also

Templates

 

 


Parts copyright 2014 Boris Software Ltd. Parts copyright 2014 Firetronic Software Ltd. Parts copyright 1998-2014 Cadence Computing Ltd. All Rights Reserved.

Menus, prompts, fields and options are from a typical installation - some items may not appear as shown. Please contact Boris support for information on additional features.