Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-19 Thread Alan Hill
Hi Mortenwhen you say 'removing the option set completely', do you mean removing from the JSON or deleting from the database? Thanks A On Thu, Jun 18, 2015 at 11:26 PM, Morten Olav Hansen morte...@gmail.com wrote: Hi I made a small change to the actions that power the UI, so it should

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-19 Thread Morten Olav Hansen
I removed it from the JSON, and when the update was complete, there was no longer a reference to it. -- Morten On Fri, Jun 19, 2015 at 1:35 PM, Alan Hill ah...@2paths.com wrote: Hi Mortenwhen you say 'removing the option set completely', do you mean removing from the JSON or deleting from

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-19 Thread Morten Olav Hansen
Hi I made a small change to the actions that power the UI, so it should work properly there now. As for trough the web-api, I was successfully able to update a TEA from being a optionSet type to a simple text type by simply removing the optionSet completely and setting valueType to text. curl -X

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-19 Thread Alan Hill
OKgot this one fixed...for some reason, my mergeStrategy wasn't getting through to our api call. Thanks for your support. Alan On Thu, Jun 18, 2015 at 11:37 PM, Morten Olav Hansen morte...@gmail.com wrote: I removed it from the JSON, and when the update was complete, there was no longer

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-18 Thread Alan Hill
Hi Morten I have tried this with trunk (build # 19453) and assigning the optionSet now seems to function correctly. However, removing the optionSet is still not possible. Should I be using any specific strategy / mergeStrategy for the remove to function? Many thanks for the quick turn around.

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-18 Thread Morten Olav Hansen
So you want to clear out the optionset completely? try and set it over as optionSet: null, and set merge strategy to REPLACE -- Morten On Thu, Jun 18, 2015 at 10:17 PM, Alan Hill ah...@2paths.com wrote: Hi Morten I have tried this with trunk (build # 19453) and assigning the optionSet now

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-18 Thread Morten Olav Hansen
Ok, I will need to look more into it then, it should have worked with mergeStrategy=REPLACE -- Morten On Fri, Jun 19, 2015 at 11:26 AM, Alan Hill ah...@2paths.com wrote: Hi Morten Many thanks for the response. Yes, remove the OptionSet assignment from the TrackedEntityAttribute. I have

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-18 Thread Alan Hill
Hi Morten Many thanks for the response. Yes, remove the OptionSet assignment from the TrackedEntityAttribute. I have tried as suggested with the following JSON and it does not remove the assignment: { id:z4fdyQtgja3, created:2015-06-18T22:28:48.352+, name:DHS 2010 - Median month of

[Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-17 Thread Alan Hill
Hi there I have a TrackedEntityAttribute created through the web api and want to perform an update to both add and remove an optionSet assignment. I have attempted to do this using a PUT, supplying the JSON previously retrieved via a GET and adding/remove the option set and setting the valueType

Re: [Dhis2-devs] TrackedEntityAttribute update - add optionSet

2015-06-17 Thread Morten Olav Hansen
Hi Please try again with the latest version of 2.19 or trunk. -- Morten On Thu, Jun 18, 2015 at 1:22 AM, Alan Hill ah...@2paths.com wrote: Hi there I have a TrackedEntityAttribute created through the web api and want to perform an update to both add and remove an optionSet assignment. I