30
Views
7
Solved
###### Structure
Question

Hi, I do have a question on a structure.

Example : Car

Type : A Color : Blue

Type : B Color : Red

I have a structure :- Car.

Attribute of the structure are : - Type, Color

How to insert data into an attribute structure so that I have a structure? i want to use the structure for a dropdown.

Car

Type : {A, B}

Color : {Blue, Red}

Solution

In the structure you can insert data same as you do for entity Or in very general term say as we assign value for any Object. Like Object.AttributeName or Entity.attributename.

So for car structure you can do like : structure -> Car {type,color}

Car.type = some value.

Car.color = same value

Regards

noted, thank you sir.

Solution

Hi,

Structure in OutSystems is a Complex compound data type so you have to create a variable of that structure type and then you can assign the value of your variable.

Structure

Variable of type Car structure:

Assigning the value:

Noted, let say if  I want to make a list structure, do I need to use list append to insert the value?

yes, first you have to create the list type variable from this structure datatype like below :

Now, this is just a normal list type variable you have, you can use All list functions.

and to insert values you can use ListAppend or ListAppendAll based on the requirement/ scenario.

yeaayyy, i got it, thank you so much sir.

good to know this helps you to understand the structure concept. and make sure you mark a reply as a solution if it helped. Would just help others if they face a similar issue.

Solution

In the structure you can insert data same as you do for entity Or in very general term say as we assign value for any Object. Like Object.AttributeName or Entity.attributename.

So for car structure you can do like : structure -> Car {type,color}

Car.type = some value.

Car.color = same value

Regards

noted, thank you sir.

Solution

Hi,

Structure in OutSystems is a Complex compound data type so you have to create a variable of that structure type and then you can assign the value of your variable.

Structure

Variable of type Car structure:

Assigning the value:

Noted, let say if  I want to make a list structure, do I need to use list append to insert the value?

yes, first you have to create the list type variable from this structure datatype like below :

Now, this is just a normal list type variable you have, you can use All list functions.

and to insert values you can use ListAppend or ListAppendAll based on the requirement/ scenario.

yeaayyy, i got it, thank you so much sir.

good to know this helps you to understand the structure concept. and make sure you mark a reply as a solution if it helped. Would just help others if they face a similar issue.

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