Local Variable with multiple entities versus using structure.

In my test, I can assign multiple entities and static entities to a local variable using the following:


Name: LocalVar

DataType: Person, PersonDetail, MovieGenre, UserMovieRating Record


Would there be any issue (such as performance, stability) using the above approach instead of using structure?

Hi Christopher,

No I do not think there are issues compared to using structures.

Regards,

Daniel

Hi Christopher,

The structures are provided by the platform to keep attributes of different data type and to hold complex data (data from multiple entities or different entities data type).

I wont see any challenge doing this however performance may be an issue and is totally depends upon how are you using this.

Also for scalability , as Outsystems has a very tight coupling with the element and requires things to be set on design time (Like Source record to a Table Record List etc.) it will be good if we try to keep things simple until there is any hard requirement of designing such complex structure. Simple things help in maintenance and also easily adjustable when you scale your application.


Regards,

-PJ-


Hi Christopher,

There's no real issue on how the program works. However, since you use the full Entity Records in the variable, it may consume a bit more memory than if you had a Structure that contains only the necessary Attributes - you won't notice this though, unless you have millions of records.

A second issue is more of a Service Studio one: it's a bit more difficult to create variables that are a Record of Entities than creating a Structure with the equivalent structure (no pun intended :)) and selecting the Structure as the type, purely because of the not-so-convenient way the Record Editor works...

Thank you all of you!

You're most welcome :). If any of the answers can be marked as Solution, please do so.

Hi Kolliboina,

Is your question related to this topic, or do you have a more general question? In any case, it's not clear to me what you mean.


Please let me know why we need to use structures?

Why we need to do manage dependency in structures?