Retrieving the CODE for organisation units and ASSIGN them to a Tracked Entity Attribute

Hi,

Is there a way I can retrieve the organisation unit CODE and ASSIGN it to a Tracked Entity Attribute (presumably using a Program Rule)???

Regards

Calle

···

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


Hey Calle,
The variable V{orgunit_code} can be used in a ASSIGN program rule action.

See 21.4.5. Reference information: Functions, variables and operators to use in program indicator expressions and filters - Table 21.14. Standard variables to use in program rule expressions.

Markus

···

On Thu, May 24, 2018 at 7:27 PM, Calle Hedberg calle.hedberg@gmail.com wrote:

Hi,

Is there a way I can retrieve the organisation unit CODE and ASSIGN it to a Tracked Entity Attribute (presumably using a Program Rule)???

Regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg



Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Markus Bekken

Software developer

University of Oslo

http://www.dhis2.org

AAAARRRRGGHH

The very first variable I tried was V{org_unit_code} - because the other related variable for the organisation unit NAME is V{org_unit_name}.

But then there is org_unit_name and there is orgunit_code (the nefarious programmers doing the devil’s work, as usual :wink: )

Thanks for rapid response - much appreciated.

Regards

Calle

···

On 24 May 2018 at 19:54, Markus Bekken markus@dhis2.org wrote:

Hey Calle,
The variable V{orgunit_code} can be used in a ASSIGN program rule action.

See 21.4.5. Reference information: Functions, variables and operators to use in program indicator expressions and filters - Table 21.14. Standard variables to use in program rule expressions.

Markus

On Thu, May 24, 2018 at 7:27 PM, Calle Hedberg calle.hedberg@gmail.com wrote:

Hi,

Is there a way I can retrieve the organisation unit CODE and ASSIGN it to a Tracked Entity Attribute (presumably using a Program Rule)???

Regards

Calle


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg



Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Markus Bekken

Software developer

University of Oslo

http://www.dhis2.org


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg