You are here: Case management > Configuring case-type behavior > Customizing the display logic for geolocation

Customizing the display logic for geolocation

You can customize the logic in a case type that determines when geolocation is displayed in the audit trail of a case. By default, the location of a case worker is always displayed for each case type in your application.

  1. Open the instance of pyGeolocationTrackingIsEnabled that applies to the class of your case type.

  2. On the Advanced tab of the When rule form, remove the default statement that always returns a true value.

  3. Click the add row icon and define a new condition.

    For example, you can check if the time of day is outside business hours.

  4. Repeat step 3 for each unique condition to consider for this case type.

  5. Enter Boolean logic in the Logic string field that references each of your conditions.

  6. Click Save to apply your new logic.

Each time that an action is performed in a case, the values in the Logic string field are evaluated. The column in the audit trail that contains the location of the case worker is displayed only when a true value is returned.

Tip: Create a version of pyGeolocationTrackingIsEnabled in a class that is visible to all case types to provide a generic override. You must manually delete all other instances of this when condition to ensure that rule resolution selects the correct version at run time.