195
Views
6
Comments
Solved
What does "Assign" actually do?
Question

I have a zero base in Coding or IT and I'm starting to learn about OutSystems because of work.

I don't really have a concept on what "Assign" really does. 

I'm just following the course and I can't really understand why should you put "Assign" and set Variable as "UserMovieRatingId" and Value as "CreateOrUpdateUserMovieRating.Id". 

Oh, and can someone explain why should you put UserMovieRating as Input Parameter and Output Parameter as "UserMovieRatingId" "Success" "Message". I only have an abstract understanding.

Should I quit my job guys? 

2023-08-28 09-08-29
Venkatesh Sundarajan
Solution

Hi SH Kim, 

Assign statement as it name says we can assign any value to any variable. A variable is a placeholder which can be assigned with any value and used for subsequent processes. There are 3 types of paramaters we will come across, 

1. Input parameter

2. Output parameter

3. Local Variable

Input parameter - it's something you need to send to that action or web block or screen to perform or function based on that. 

Output parameter - it's something you will receive in return as a result. You can use this in other actions as well. 

Local Variable - This is a dynamic placeholder to hold the value for processing.

In your case,

User is inputting the rating for a movie . This rating needs to be stored in table, so then only what rating that user has given we can show in UI screen. 

For every record creation we will get an ID of that record as output parameter from the table. 

Initially it will be difficult to understand things, as time passess you will understand everything. 

Please do watch the training material atleast 2 times and listen to each word. This really helped me a lot. 

I really appreciate your interest. 

Hope this helps! 

Thanks. 

2025-10-18 11-13-53
Ramesh subramanian
Solution

Hey SH Kim,

UserMovieRatingId  is Identifier. 

Create or Update a record (Create if Id  = NullIdentifier(), else update)

after create record and record id will Assign UserMovieRatingId   

or 

passing UserMovieRatingId   update already record.

please check this link

https://www.outsystems.com/forums/discussion/56793/entity-actions-documentation/

thanks

2025-10-18 11-13-53
Ramesh subramanian

Hey SH Kim,

If my answer helped you so please mark it as a solution and close this discussion.

thanks

UserImage.jpg
Accelance Partners
Solution

Hi @SH Kim
The first case is, When you want to create a new record then Id will be auto-generated. it set it to NullIdentifire() default, 
Another case is when you want to update/Edit an existing record then you need to find out which record you want to update. for that, you need the ID of that record.
In this case, you have used CreateUpdate Action this action will perform both operations either it will create a new entry or It will edit an existing record.
Here, you have a list of records "UserMovieRating" this record you want to create or update so that you have to assign the Id of that record.

can you provide a link to which course are you following?

Thanks 
Shriyash

2025-10-18 11-13-53
Ramesh subramanian
Solution

Hey SH Kim,

UserMovieRatingId  is Identifier. 

Create or Update a record (Create if Id  = NullIdentifier(), else update)

after create record and record id will Assign UserMovieRatingId   

or 

passing UserMovieRatingId   update already record.

please check this link

https://www.outsystems.com/forums/discussion/56793/entity-actions-documentation/

thanks

2025-10-18 11-13-53
Ramesh subramanian

Hey SH Kim,

If my answer helped you so please mark it as a solution and close this discussion.

thanks

UserImage.jpg
Accelance Partners
Solution

Hi @SH Kim
The first case is, When you want to create a new record then Id will be auto-generated. it set it to NullIdentifire() default, 
Another case is when you want to update/Edit an existing record then you need to find out which record you want to update. for that, you need the ID of that record.
In this case, you have used CreateUpdate Action this action will perform both operations either it will create a new entry or It will edit an existing record.
Here, you have a list of records "UserMovieRating" this record you want to create or update so that you have to assign the Id of that record.

can you provide a link to which course are you following?

Thanks 
Shriyash

2023-08-28 09-08-29
Venkatesh Sundarajan
Solution

Hi SH Kim, 

Assign statement as it name says we can assign any value to any variable. A variable is a placeholder which can be assigned with any value and used for subsequent processes. There are 3 types of paramaters we will come across, 

1. Input parameter

2. Output parameter

3. Local Variable

Input parameter - it's something you need to send to that action or web block or screen to perform or function based on that. 

Output parameter - it's something you will receive in return as a result. You can use this in other actions as well. 

Local Variable - This is a dynamic placeholder to hold the value for processing.

In your case,

User is inputting the rating for a movie . This rating needs to be stored in table, so then only what rating that user has given we can show in UI screen. 

For every record creation we will get an ID of that record as output parameter from the table. 

Initially it will be difficult to understand things, as time passess you will understand everything. 

Please do watch the training material atleast 2 times and listen to each word. This really helped me a lot. 

I really appreciate your interest. 

Hope this helps! 

Thanks. 

2022-09-05 08-23-51
Naveen N

@SH Kim In simple words, let's assume  if you are having a local variable having value x=10 and if you are clicking one button, on that button screen action you can assign a different value, means you can change the old value and you can replace it with a new value. you can assign x = 0; after clicking that button the value will be changed.

2022-02-08 09-40-14
Chandrashekhar Mankar

Hi SH Kim, Assigning in simple terms means saving your value in a variable, for eg you can look at the below program.

A = 5

B = 10

C = A +B

if you look at the above flow, you would realize that the value of C = A+b that is C = 5+10 = 15.

What I am trying to say is that you are storing the value of A+B in another storage variable "C".

Similarly, Outsystems also, when you assign something to someone, basically you store it in a variable which is on the left side of the = sign.

I hope you get it.


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