Hello DHIS2 developers

Quick question:

*Is there a way to query the current Organization ID from a dataset?* I
found the following, and it works:

vuFacilityID = dhis2.de.currentOrganisationUnitId;

*Is there a better variable I could poll for this information?*

Reason: There is some information I want to display on the dataset that
changes based on organization, and I would rather not make an individual
dataset for each organization and assign them. Once I get the OrgID with
the above method, I use $.getJSON to query the Web API:

$.getJSON('../api/organisationUnits/'+vuFacilityID+'.json',
function(FacilityData)

Then I use the results to tailor some of the information presented to the
users (Data Entry Personnel)

*Is there a better/simpler way to do this?*


Timothy Harding
PeaceCorps Volunteer
Republic of Vanuatu
[email protected]
+678 5955137
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to