Eventdatavalues not show in SQL-VIEW in 2.36.3

Dear Team,

while i am write sql-view like " select uid,executiondate, eventdatavalues from programstageinstance;" and get data through api we not get the all information but not eventdatavalues

please support and help what is the issue

Hey @Mithilesh_Kumar_Thak May I ask you to clarify a bit, do you mean that the SQL query gives you all the results you want including (eventdatavalues) but not when using API?

Also, what is the version of the DHIS2 instance that you are using? A screenshot of the API HTTP request could be helpful too. Thank you!

Dear @Gassim thanks for replay

i am using 2.36.3 version and in sql-views all rows appears but eventdatavalues not appear

i use query like “” select uid,executiondate, eventdatavalues from programstageinstance;"

when i want to get data through api the columns uid and executiondate are show but the columns eventdatavalues is empty.

and i also test on play-2.36.3 same issue appears
thanks for you support
Thanks and Regards

Mithilesh Kumar Thakur

Yes, thanks! I see what you mean. I think that this is because of the dataEventValues datatype which needs casting. As you see in the following example, @vikwato used casting the dataEventValues to json

Hope this helps! :smiley:

Thanku very much @Gassim i will try and let you know and i think this query is very useful

and i also try like eventdatavalues::TEXT and we get the query result as TEXT of json datavalue.

Thanks and Regards

Mithilesh Kumar Thakur

1 Like

@Mithilesh_Kumar_Thak you’re welcome! Did you try it and did it work? Thanks! (:

Dear @Gassim thanks a lot yes it work.

Thanks and Regards

Mithilesh Kumar Thakur

1 Like

You’re welcome! (:

@Mithilesh_Kumar_Thak Kindly share the full script so that we can also reuse it.