201
Views
5
Comments
Server Actions output parameter
Question

Hi 


I have a webscreen in the preparation I have called a server action.


The server action has a for loop which gets the lists of ids from a parent  table and  loops to get the related child table where a relationship exist.. I have created an output parameter with these 2 tables values where a relationship exist.


Now I would like to show the values on a table record on the webscreen. Can this be done? If so how,


Thank you

Olive


mvp_badge
MVP
Rank: #162

Hi Olive,

First of all I would like to advise you to check the online training available here.

And second yes it's possible to list elements in a Table Record.

Rank: #5651

Hi, Olive.

Just set your output parameter to list type.
Use that list on table record.

I hope help.


Regards 

Hi Olive, 


can't you solve doing this join in the aggregate or through sql advanced?


Put the print of the tables and the result you expect so we can help you.

regards.


Hi Olive, 

You can do it with use of an extra local variable. Create a local variable (list or record) with same structure as your output of your server action. 

Now as like we do normally for aggregate result display. You use the local variable to display. 


Assign the output of your server action to the local variable. 

If you r using list to store make sure you clear at the start of preparation. 


And also just to run the aggregates we should not create a server action. Outsystems does not recommend it. 


If it is possible do it in preparation it self you can still use local variable here. 


Regards, 

Rama