NOTE: As of TaroWorks 4.4, this work around is no longer necessary.
Currently, you can not filter the child records that are displayed in a mobile user's hierarchy drill-down, but there is a work around which will be described in this article. The feature request has been logged for future development.
Let's use Aquacomb, our made up company, as an example.
Aquacomb builds wells and then monitors the health progress of its well-site members. The mobile users have monthly check-ins with the well-site members. The hierarchy drill-down for a typical Job is typically Region > Well-site > Well-site Member. However, some well-site members have moved away or elected not to partake in the program. Therefore we no longer want them to show up in the drill-down hierarchy for that well-site. To achieve this, you can create a relationship between the Well-Site and Well-Site Member that represents only the active Members. This relationship field will only be populated with a real well-site when the member is active, otherwise it will be assigned to a well-site called "Inactive".
- Create a Lookup/Master-Detail field on the Well-Site Member object (or the object you'd like filtered). Well-Site Member will be the child and District (or the parent in your existing drill-down hierarchy) will be the parent. You should name it something that distinguishes it from the existing relationship, such as "Active Members".
- Rebuild the drill-down hierarchies for your Job to use your new field: Region > Well-site> Well-site Member(Active Members)
- Create a Well-Site called "Inactive", and record the Salesforce id for that record (The last 15 digits of the url when viewing the detail record of well-site "Inactive".
- In the Setup Menu, open the Process Builder and create a process such that if the Well-site member is active, the system copy the Well-Site from the existing field into the Well-site (Active Member) field that you created for your drill-down hierarchies.
- Create a second step the process, where if the Well-site Member is marked inactive, the Well-site Member Active field will be set to the "Inactive" well-site record you created, used the Salesforce ID recorded.
For only existing records:
- Run a report on all your active Well-site members, and export that data. (Assumes you have an existing field that captures whether the member is active.)
- Using an import tool, import the Well-Site value into your newly created relationship field of "Active".
For any questions about this work-around, please reach out to firstname.lastname@example.org.