Hello,
The data grid fails to autogenerate and doesn't show any data.
The Rest api looks like this and the response structure is automatically created by Outsystems after testing the api call.
In JSON format, the data looks like this: [{list},{list},{list}], see screenshot.
I then created a server action to form an URL so I can use it to feed the datagrid:
URL= GetOwnerURLPath()+"rest/Helan/GetTasks?team="+team+"&date="+date
In the preparation of the screen I call the server action that I just created and give the input parameters
Finally I feed the data grid like this:
The result is an empty data grid.
I tested the api call and the data can be fetched, it's just the grid that doesn't show my values .
Could it be that my response is not okey? I mean the structure is automatically created by Outsystems itself, but maybe it's constructed the wrong way?
Thanks in advance for your help and ideas!
I cannot share an .oml file as I'm working with sensitive data. Sorry in advance.
Kr,
problem solved!
Hi @Shirley Grenelle,
Sorry for the time waiting for the answer. We have tested on our side and everything seems to be working as expected.
To help I need a bit more info:1) Do you have the rest API on the same module of the page? 2) Can you share your query/aggregate filters?
Best Regards,João Ferreira
Hey João,
Sorry for my late response as well, I'm currently on holidays ;)
Answers:
1) Yes, the rest API is consumed in the same module2) I don't use query/aggregate filters because the response of my API request is already a structure, so maybe the step where I build the url in a server action isn't needed (because that's only for exposed api's build in Outsystems itself)?
The api I call is from a third party (our IT department), so I consumed the API. When I use the call to get data, for example to iterate through the data, I get all the results I need. So I know the response of the api call works in outsystems. I just can't get it to work with the datagrid. It's so frustrating because the api call is specially made so we could use the datagrid functionality.
I also tried filling in the URL like this (see screenshot), but it doesn't work either. When I try with text columns instead of the autogeneratecolumns feature, it also doesn't work :(
@João Ferreira
Hi @Shirley Grenelle , How did you fix this? Because I have the same problem and I can't figure out why it doesn't work.