Hey @bindugowrig to answer your question let’s carefully consider your scenario.
- you are dealing with offline users (since you avail tasks at each level), each with a replication depth of
- you are working with both
tasks to capture data and cascade it down the hierarchy
- you want to match reports (not contacts) based on a report attribute that also exists in another report at a given hierarchy level.
What is the implication of the above aspects?
- for you to trigger a task a hierarchy level below (e.g. national to regional), you need a report to belong to the level (place for that matter). If the report is submitted as an action, you can easily put it at the lower level by either selecting the contact or submitting the report from the contact’s profile
Action tab. The same will apply as you move down the hierarchy, for reports submitted as actions. Remember, in your case, you cannot use a report existing at a level above the hierarchy to trigger a task to a level below, because of the offline nature of the users and the replication depth.
- for tasks, let’s take a scenario whereby you have submitted an action report at the national level to the region level and you want another task at district level. First, the regional user has to complete the task, and to cascade the information to district level, you need to create an additional document with
place_id pointing to the district. It is the latter report that will enable you trigger a task at district level. As you do so, you are making copies of the data and effectively cascading the data down the hierarchy.
- regarding matching of reports, you need to have an existing report for the contact that you want to do the match. This means that as you move data up the hierarchy, you must keep a record of relevant attributes. For example, if we have a report as follows for
health_center with uuid
a sample copy of the data at
district level can take the format below.
To match reports at
district level when a report is submitted from the
region level (Region-> District as per your hierarchy) that looks like the sample below,
you simply use the matched attribute
Key things to note:
- Ensure you capture all relevant attributes you need at each level as you move data up and down.
- Utilize depth and needs_signoff where necessary.
resolvedIf using reports shall work if dealing with reports within the same context i.e.
- Utilize contactLabel to trigger tasks up the hierarchy.