26
Views
6
Comments
Solved
Output SQL not assigned to output variable
Question

Somehow, in my server action, the output of my SQL is all good (I'm expecting a list of id's), but it isn't assigned to my Output_List variable properly (see the debug window down below). I'm quite sure something is wrong with my data types. My Output_List expects immediately an ID, not the structure which includes the ID, as the sql outputs. But I do select the structure as a list as the datatype of the Output_List, so I'm not sure how to change this. 


Hopefully this makes sense :) 


2025-12-15 09-29-24
Thibaut G
Solution

Not sure if i understand the question correctly but i notice that you are trying to read the value of the output parameter by placing the breakpoint on the Assign widget. At this stage in the flow, the output variable is not assigned yet. You should put the breakpoint on your Endpoint to get a correct value reading.


Regards

UserImage.jpg
Janneke van Hulten

Oh, you're right! Thanks a lot! Actually, it is assigning properly. It's on the clientside then that something is going wrong, gonna dive into that. Thank you!!

2025-12-15 09-29-24
Thibaut G

You're welcome,


Were you able to fix the issue on the front end? If so, don't forget to mark the best answer as solution, or describe how you solved the issue and mark that as the solution (keeping the forum clean)


Regards

UserImage.jpg
Janneke van Hulten

Unfortunately not, I found it probably has to do with the platform optimization pattern as described here: https://www.outsystems.com/forums/discussion/65217/loss-of-data-returned-by-server-action/


I'm not sure how to fix it just yet, but I guess it's a different topic. I'll mark the answer most useful to my question! Thanks again.

UserImage.jpg
Janneke van Hulten

Actually, the count is also not transferring properly, even though the data type is definitely correct. I really don't understand what's going on, help!!! :)

2021-06-03 11-03-21
Anubhav Rai

Hi @Janneke van Hulten ,

As in the screenshot, it is showing SQL1.Count is 17.
Please check if SQL1.List is giving proper data or not?

Do you want to extract only IDs from the SQL output? 
If yes then prepare the variable with ID's List after that you can use "list append" with "For each" Loop to prepare the list of IDs.
Or if you want to assign all the data in the Output_List then please make sure the Output structure of your SQL is the same as Output_List data type.

Please let me know if you have more queries.



Regards,


2025-12-15 09-29-24
Thibaut G
Solution

Not sure if i understand the question correctly but i notice that you are trying to read the value of the output parameter by placing the breakpoint on the Assign widget. At this stage in the flow, the output variable is not assigned yet. You should put the breakpoint on your Endpoint to get a correct value reading.


Regards

UserImage.jpg
Janneke van Hulten

Oh, you're right! Thanks a lot! Actually, it is assigning properly. It's on the clientside then that something is going wrong, gonna dive into that. Thank you!!

2025-12-15 09-29-24
Thibaut G

You're welcome,


Were you able to fix the issue on the front end? If so, don't forget to mark the best answer as solution, or describe how you solved the issue and mark that as the solution (keeping the forum clean)


Regards

UserImage.jpg
Janneke van Hulten

Unfortunately not, I found it probably has to do with the platform optimization pattern as described here: https://www.outsystems.com/forums/discussion/65217/loss-of-data-returned-by-server-action/


I'm not sure how to fix it just yet, but I guess it's a different topic. I'll mark the answer most useful to my question! Thanks again.

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