Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread Jason Pickering
Hi Moses, You need to use the UID of the organisation unit not their integer ID. You need to place string literals in single quotes. So, it should be something like SELECT merge_organisationunits('foo', 'bar' ,'SUM'); Regards, Jason On Sun, Jan 28, 2018 at 5:28 PM, moses mwale wrote: > He

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread moses mwale
wow some major progress i thought it was special sql. I now know its normal sql. dhis2_test=> SELECT merge_organisationunits('FfX6DGeVsJd', 'qqkYhasbAcf' ,'SUM'); ERROR: column "attributeoptioncomboid" is of type integer but expression is of type character varying LINE 6: value, ^ HINT:

[Dhis2-devs] Retrieving date of last login of user X

2018-01-29 Thread Calle Hedberg
Hi I've looked through the parameters for the web API resource "Users", but I cannot immediately see a way of retrieving the last logged in date for a specific user. Is there a way of doing this, and if yes what is the syntax / parameter to use? regards Calle ***

Re: [Dhis2-devs] [Dhis2-users] Organisation Units repetitive structure

2018-01-29 Thread Knut Staring
Hi Bernard, In order to elucidate what is going on, the next places to check are the browser console and the server log. 1) In Chrome, click on Ctrl+Shit+I to open the console window and look for error messages in RED. 2) For the server, look for catalina.out in the logs folder (What is your set

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread Jason Pickering
Hi Moses, The version of the function looks to be a bit outdated. I just updated it again in this commit . Maybe you can try again with this new version and see if it works? Regards, Jason On Mon, Jan 29, 2018

Re: [Dhis2-devs] [Dhis2-users] Option sets and data elements

2018-01-29 Thread Jason Pickering
Hi Nada, This sounds like a "cascading drop down". This is not supported directly in DHIS2, so you will need to implement your own front-end solution for this. Regards, Jason On Sat, Jan 27, 2018 at 9:49 AM, Nada Ghosn wrote: > Good morning, > Reference is made to tacker/event capture > Is it

Re: [Dhis2-devs] Retrieving date of last login of user X

2018-01-29 Thread Jan Henrik Øverland
https://play.dhis2.org/2.28/api/users.json?fields=userCredentials[id,name,username,lastLogin] On 29 January 2018 at 12:02, Calle Hedberg wrote: > Hi > > I've looked through the parameters for the web API resource "Users", but I > cannot immediately see a way of retrieving the last logged in date

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread moses mwale
Thanks very much it has worked just analyzing the data now. You a savior. On Mon, Jan 29, 2018 at 1:20 PM, moses mwale wrote: > Alright thanks Jason on it. > > On Mon, Jan 29, 2018 at 1:10 PM, Jason Pickering < > jason.p.picker...@gmail.com> wrote: > >> Hi Moses, >> >> The version of the functio

Re: [Dhis2-devs] Retrieving date of last login of user X

2018-01-29 Thread Jan Henrik Øverland
For a specific user: https://play.dhis2.org/2.28/api/users/N3PZBUlN8vq.json?fields=id,name,userCredentials[id,name,username,lastLogin] On 29 January 2018 at 12:40, Jan Henrik Øverland wrote: > https://play.dhis2.org/2.28/api/users.json?fields=userCredentials[id,name, > username,lastLogin] > > On

Re: [Dhis2-devs] [Dhis2-users] Data elements assignation

2018-01-29 Thread Knut Staring
Hi Mamadou, I agree with Michael that the most flexible way is to use the web API and create a JSON structure (e.g. with MS Excel), in particular https://docs.dhis2.org/master/en/developer/html/webapi_metadata_crud.html#webapi_adding_removing_objects_collections However, if you find this too cumb

Re: [Dhis2-devs] Retrieving date of last login of user X

2018-01-29 Thread Calle Hedberg
Lukas/David, That works - thanks! Regards Calle On 29 January 2018 at 13:14, David Palmer wrote: > Hi Calle, > > > > Something like > > /api/users?fields=userCredentials[username,lastLogin]&filter= > userCredentials.username:eq:[YOUR_SPECIFIC_USER] > > should do the trick > > > e.g. > > https:

Re: [Dhis2-devs] [Dhis2-users] Data elements assignation

2018-01-29 Thread Knut Staring
Oops, you cannot select by group anymore. However, you can skip step 3) and 4) and rather do the filtering of data elements directly in 5) On Mon, Jan 29, 2018 at 12:43 PM, Knut Staring wrote: > Hi Mamadou, > > I agree with Michael that the most flexible way is to use the web API and > create a

Re: [Dhis2-devs] Retrieving date of last login of user X

2018-01-29 Thread Calle Hedberg
Jan Henrik, Thanks - seems you can either filter on a specific user using the UID or using the filter parameter. The latter will usually be a bit easier Regards calle On 29 January 2018 at 13:42, Jan Henrik Øverland wrote: > For a specific user: https://play.dhis2.org/2.28/api/users/N3PZBUlN8v

Re: [Dhis2-devs] Retrieving date of last login of user X

2018-01-29 Thread Jan Henrik Øverland
Yes, that's up to you. On 29 January 2018 at 12:47, Calle Hedberg wrote: > Jan Henrik, > > Thanks - seems you can either filter on a specific user using the UID or > using the filter parameter. The latter will usually be a bit easier > > Regards > calle > > On 29 January 2018 at 13:42, Jan Henri

Re: [Dhis2-devs] merging facilities (org-units) without losing data

2018-01-29 Thread moses mwale
Alright thanks Jason on it. On Mon, Jan 29, 2018 at 1:10 PM, Jason Pickering < jason.p.picker...@gmail.com> wrote: > Hi Moses, > > The version of the function looks to be a bit outdated. I just updated it > again in this commit >

Re: [Dhis2-devs] [Dhis2-users] Data elements assignation

2018-01-29 Thread Mamadou Diao Diallo
Many thanks, will try it. Diao On Mon, Jan 29, 2018 at 11:45 AM, Knut Staring wrote: > Oops, you cannot select by group anymore. However, you can skip step 3) > and 4) and rather do the filtering of data elements directly in 5) > > On Mon, Jan 29, 2018 at 12:43 PM, Knut Staring wrote: > >> Hi