In https://www.outsystems.com/learn/lesson/1848/writing-data-to-a-rest-api-post-and-put/?LearningPathId=0  , in order to create a form in detail page,  we are told to create a local variable , set the data type to certain structure, and import attributes from the structure into the form. I wonder why Outsystem does not provide a way to directly import from structure attributes into the form, so that we can skip the local var creating step? I feel that step is redundant.

Hi Tony

A structure is a data type, it contains a definition of atttibutes.

An input, local or output parameter is an instance of a data type that holds data.

Thus s structure like any other data type can be instanciated multiple times in the same scope.

The way you like to use a structure would limit you to only use one structure per screen or action.

Regards,

Daniel

Hi Tony,

A variable is a memory in the computer that holds value.

A structure is a data type of a variable. It defines what operations can be done on that variable.

Say, u have integer data type, the allowed operations are arithmetic plus, minus, etc.

So, in this case, not the structure, but the local variable that holds the values.

regards

 

Financial Freedom wrote:

Hi Tony,

A variable is a memory in the computer that holds value.

A structure is a data type of a variable. It defines what operations can be done on that variable.

Say, u have integer data type, the allowed operations are arithmetic plus, minus, etc.

So, in this case, not the structure, but the local variable that holds the values.

regards

 

Isn't that what I already explained?


Hi Sir,

I am in doubt with this:

The way you like to use a structure would limit you to only use one structure per screen or action.

I do not think a structure can be used.

regards

Behavioral wrote:

Hi Sir,

I am in doubt with this:

The way you like to use a structure would limit you to only use one structure per screen or action.

I do not think a structure can be used.

regards

Yes indeed that is not possible that is my point, a structure is only a definition. But that was the original question why a structure could not be used as a variable, that I tried to explain.


Okay, Sir,

In Java we have a class and we can use it to save values in static fields.

However, Outsystems is not Object Oriented.

regards