Related to SQL queries


I  don't have any idea about the bug.


Get Employees must set a value to the Employees output parameter.

Screenshot (2).png

mvp_badge
MVP
Solution

Hi Premkumar,

An SQL widget in OutSystems MUST have an output parameter.

For SELECT SQL statements it must be a list that matches the returned columns.

For SQL statements that don't return data like UPDATE, DELETE, unfortunattly you need to set at least one output parameter. Just create a structure called SQL with a text attribute and add it as output parameter. That will fix the error. It is stupid the way it works, but although reported to OutSystems many times, it still works like this

For more information see:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Variables/Output_Parameter

Regards,

Daniel

mvp_badge
MVP
Solution

Hi Premkumar,

An SQL widget in OutSystems MUST have an output parameter.

For SELECT SQL statements it must be a list that matches the returned columns.

For SQL statements that don't return data like UPDATE, DELETE, unfortunattly you need to set at least one output parameter. Just create a structure called SQL with a text attribute and add it as output parameter. That will fix the error. It is stupid the way it works, but although reported to OutSystems many times, it still works like this

For more information see:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Variables/Output_Parameter

Regards,

Daniel

Hi Premkumar,

A Data Action must have at least 1 MANDATORY output parameter, which in your case is a list of Employees.

In the logic of your Data Action, you implemented an SQL Query (correct), but you are not assigning any value to the output parameter Employees. What is missing is an assign element right after your SQL Query, on which you assign the list return by the SQL Query to the output parameter Employees.

Hope it helps.

Best regards,

Paulo

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