Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
outletown typelocation:outlet:outlet/location_type
outletblock namelocation:outlet:block/name
outletstate namelocation:outlet:state/name
districtown typelocation:district:district/location_type
districtstate namelocation: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.

...