146
Views
4
Comments
How to display data returned from SQL query in the UI

Hi, I just created my first SQL query qith help of a tutorial: https://www.outsystems.com/training/courses/146/sql-queries/?LearningPathId=18.

The query is tested and seems to work just fine.

Now my question is, how can access this data in the Interface tab? In need to access this data in order to display it in the UI.

Thank you in advance for your help

2024-07-31 14-04-13
Carlos Cardoso

Hi, where did you created the SQL? If it's in the same module of the UI, you just need to create a data action in the screen and put there the Advance SQL widget. If it was in a different module you need to import the server action and use it in the data action. 

Can you send the .oap file to check?

Hope this help's

2023-02-09 12-36-42
Damian Fonville

To better understand SQL queries in OutSystems You could follow the course SQL Queries.  

Towards the end of the course, there is an exercise that demonstrates the usage of a query within a UI element. You can access the course and exercise through the following link: 

https://www.outsystems.com/training/lesson/2056/sql-queries 

2025-10-18 11-13-53
Ramesh subramanian

Hi agnieszka skalska,

just like this example

1. Create GetLocalContract (Data Action)

2. In that action, we have LocalContract contact Adv.SQL 

3. output data assign to the data grid.

Thanks,

Ramesh

2021-06-28 14-36-12
Rafi Ahmed khan

Hi agnieszka skalska,

Please watch the below video , its about how to use SQL on interface , you need to create a Data Action for SQL only rest will be the same as Aggregate implementation. 

https://www.outsystems.com/training/lesson/2078/demo-how-to-convert-an-aggregate-to-a-sql-query?LearningPathId=18

Cheers,

Rafi 

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