data queries

  

I have a question, what is the different between the "GetMovies List type" and "Get Movies Record Type"?

when I choose the "Get Movies Record Type", the OutputList will return a singel record

but if I choose another type ,it will return a list?

The difference is the number of the returns?

pls let me know if I'm wrong,Thank you very much!

and an other question

if the output parameter only exit in the sever action and SQL and aggregate 

screen action doesnt have the output parameter?

Thank you very much!

Hi yanyi,

You can check Outsystems data types here https://success.outsystems.com/Documentation/10/Reference/Data/Data_Types

But basically while integet and string basic data types a  Record is a compoud Data type that cointains multiple attributes with different data types. than you can have lists of any of those types.ex: List of strings, list of integers, list of records

About the second question I didnt understand can you explain it better?

Regards,

Marcelo

Solution

Hello yanyi

You're confusing things.

1. Aggregates and SQL ALWAYS return a LIST. The type of the list is all Entities and/or structures you are using inside them (sources, in aggregates, output in SQL). 

2. "GetSOMETHING List Type" and "GetSOMETHING Record Type" are just to make your life easier, if you want to declare a variable of same type than the output of an Aggregate or SQL. So, in the first case you will create a LIST with the same output structure of the aggregate / SQL, in the second case you will create a simple RECORD with the same output structure of te aggregate / SQL.

3. Screen Actions CAN'T have output parameters.

4. The output LIST of Aggregates / SQL used in preparation can be used in the Screen and other Screen Actions (this one is not advisable due performance implications). 

I recommend you the online training if you didn't it yet.

https://www.outsystems.com/learn/courses/15/developing-outsystems-web-applications/

Cheers.

Solution