78
Views
11
Comments
Solved
Button not working
Application Type
Reactive

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.

Cs_mod_new.oml
Main_mod_new.oml
2023-10-27 15-22-44
Rahul Yadav
Solution

Hi @Sravya M,

Did you check the filters in the aggregate of your service? 

Thanks 
Rahul Yadav

2024-05-08 06-29-37
Prince Aadil Khan Panwar

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

2026-05-19 09-58-29
Lucas Soares
 
MVP

Hi Sravya, I hope you are well.

I looked at your .oml and noticed a few things you can change to make it work:


  1. The "search" button in your web block refreshes the "DataActionGet".
  2. The "DataActionGet" in turn takes the result and places it in the "Response" output parameter.

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

Main_mod_new.oml
UserImage.jpg
Sravya M

@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.

Screenshot 2023-12-30 135907.png
2023-10-27 15-22-44
Rahul Yadav

Hi @Sravya M

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?

Thanks

Rahul Yadav

Main_mod_31122023.oml
UserImage.jpg
Sravya M

@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

2023-10-27 15-22-44
Rahul Yadav

Hi @Sravya M,

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.

Thanks

Rahul Yadav


2023-10-27 15-22-44
Rahul Yadav

Hi @Sravya M,

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


Cs_mod_31122023.oml
TestFile_31122023.xlsx
Main_mod_31122023.oml
UserImage.jpg
Sravya M

@Rahul Yadav Still facing the problem.Iam Attaching my Oap

test_app_new.oap
2023-10-27 15-22-44
Rahul Yadav
Solution

Hi @Sravya M,

Did you check the filters in the aggregate of your service? 

Thanks 
Rahul Yadav

2023-10-27 15-22-44
Rahul Yadav

Attaching the oap for filter changes, @Sravya M 

Thanks

Rahul Yadav


test_app_0201024.oap
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.