...
Accessing Locations: When building a mobile application, fixture data can be accessed through the auto-created location fixture on the phone.
Example Location Fixture
...
Referencing Location Hierarchies in Case List and Details Page
When making a module against supply-point cases, you can reference any location property available in the fixture, as well as any properties of any parents all the way up the chain. To reference a property, you must type a four part code into the case list or details configuration. You need to type this formula in the property box under Display Properties. The format is as follows:
location:[my type]:[reference type]/[property name]
Everything in brackets is something that you replace according to the following table. The colons and slash are mandatory.
- location: Just the word "location". This never changes.
- my type: The type of the location you expect to be in the case list. This is typically the lowest-level location type, e.g. "outlet". See the "type code" field under Locations (Advanced) in setup to see what to put for each type.
- reference type: The type of the location you want to reference. This could be the same as "my type".
- property name: The property you want to reference.
The following examples are for a simple hierarchy containing a state, district, block and outlet. Advanced .
I am a... | referencing my... | Syntax to use |
---|---|---|
outlet | own type | location:outlet:outlet/location_type |
outlet | block name | location:outlet:block/name |
outlet | state name | location:outlet:state/name |
district | own type | location:district:district/location_type |
district | state name | location:district:state/name |
Example Location Fixture
This is the corresponding fixture that would be used. Advanced queries can be done if you understand this structure.
...