22
Views
5
Comments
Solved
[Data Grid Web] [Data grid] Data from stored procedure
Forge component by OutSystems R&D
41
Published on 14 Dec 2020
Application Type
Traditional Web

Hello,


Is this possible to retrieve the data from ms db using stored procedure and put them into grid container?


Thank you

Staff
Rank: #52
Solution

Hello Hiossen,

Currently the only way to bind data to the Data Grid component is using a REST endpoint.

Since you already have the SQL Advanced in the Preparation, is it possible to move it to a REST endpoint created by you?

This way you could bind the result of the query to the data grid.

Is this an option or your use case doesn't allow this?

Thanks,

Bruno Martinho

Rank: #493

Hi IT, 

Why don't you use a view instead of a stored procedure?

See this link: How to call a Store Procedure.

Hope it helps.

Best regards.


Rank: #61582

Hello,

I mean if this is possible to bring the data in preparation using sql function (not using RestURL) and put the data to the Grid.


Rank: #493

Yes, it is possible.

See this link to see how to do it: https://www.outsystems.com/training/lesson/1769/advanced-queries-sql

All SQL widget need to have an output defined and you can do this using entities or structures.

Staff
Rank: #52
Solution

Hello Hiossen,

Currently the only way to bind data to the Data Grid component is using a REST endpoint.

Since you already have the SQL Advanced in the Preparation, is it possible to move it to a REST endpoint created by you?

This way you could bind the result of the query to the data grid.

Is this an option or your use case doesn't allow this?

Thanks,

Bruno Martinho

Rank: #493

Hiossen,

After reading the Bruno's reply I saw that I misinterpreted your problem.