when iam clicking on the serach button i want to display a list below .But its not showing. Iam attaching omls.Apis consumed and exposed in two modules.Please help .Iam a beginner.
Hi @Sravya M,
Did you check the filters in the aggregate of your service?
Thanks Rahul Yadav
Hi @Sravya M
I checked your oml and applied break-point for debugger. and whenever i click on search it goes directly to the Api wrapper function which means the search button is working.
Now the issue can be there is no related data of the search which you are searching for. I will suggest you to check the api into Postman or into the Outsystems with the default values and test it and then apply to the action.
Hope this helps
Thanks
Prince
Hi Sravya, I hope you are well.
I looked at your .oml and noticed a few things you can change to make it work:
However, your list uses the local variable "Flight", which is empty, so no list is displayed, even if the response contains records.
To solve the problem, you need to add an "OnAfterFetch" event to the "DataActionGet", and within this OnAfterFetch action you place an "assign" or "ListAppendAll" pointing the result of the "Response" to the local variable "Flights".
Okay, this way, if the response is bringing a record, this record will go to the local variable "Flight" and its list on the screen that points to this local variable will be displayed.
Or to make things easier, you can point your screen list directly to the output of "DataActionGet".Response, as in the image below:
I'm attaching your .oml so you can see what I adjusted.
Until,Lucas Soares
@Lucas Soares when iam doing like this Iam getting this error.Please help. I changed the consumed api output parametr flight to fligt list.(In the api exposed module)then the error was gone.But now no values coming.
By accessing the swagger documentation of REST service exposed from CS_mod -
https://personal-frxjr390.outsystemscloud.com/Cs_mod/rest/RESTAPI1/#/RESTAPI1/RESTAPIGetbyInputs
I updated the response structure of consuming service on top of @Lucas Soares's added oml.
Attaching the oml for your reference. Can you try it once?
Rahul Yadav
@Rahul Yadav Yes tried with this .But when i click on search no error coming but no values too in the list below the search
Can you post a screenshot or attach a file with the data set of Flight table in Cs_mod module? Currently I dont have any data in the table and unable to validate the REST service.
I bootstrapped some sample data in my personal environment, modified code at few places and it seems to work now. Please check the below url for it -
https://personal-cscpmcir.outsystemscloud.com/Main_mod/HomeSearch
Attaching the omls and bootstrap file for your reference. Let us know if you are still facing any issue. Thanks,
@Rahul Yadav Still facing the problem.Iam Attaching my Oap
Attaching the oap for filter changes, @Sravya M
@Rahul Yadav