Assign Variable option not present working with version 10.24.0

0
working with version 10.24.0 i am not able to find assign varibale option and when i do create variable i dont get my object type variable shows different datatypes but not object type
asked
5 answers
1

In Mendix, if a variable already exists you cannot create another variable with the same name — you can only change its value. The main confusion here is that the Change variable activity does not work for object variables. It is only meant for primitive types (like String or Boolean). For objects, you need to use Change object instead. If this still doesn’t fully address your issue, please explain the customer requirement and what you are trying to achieve in a bit more detail, and I’ll try to help again.

answered
0

Hello Devesh,


I believe the issue here is you are creating a variable (create variable) instead of what you really want to create that should be an Object variable (create object).

Variables have different types (string, int, long etc) While objects reflect an instance of an entity.

So in your case create an object and when you pick the entity choose the object type you want to create on the "select".


Hope this helps.

answered
0

Create Variable is used to store temporary, simple data inside a microflow. You create primitive data types such as String, Integer, or Boolean, and they only exist while the microflow is running. It is typically used for calculations, storing intermediate results, or holding temporary text values. These variables are not entities and are not written to the database.


Create Object, on the other hand, creates a real instance of an entity. This means you are creating an application object that has attributes and associations and can be committed to the database. It is used when you want to create actual records, such as a new user, order, or form data.


In short, Create Variable is for temporary values, while Create Object is for creating entity-based data records.

answered
0

So i want to keep the variable ingredientExisting to ingredientExisting only if it exist but its showing a issue that name with same variables cannot exist i tried using gpt for the issue it says assign the variable so what should we do about it. i am not able to use change variable option since my object type is not visible there.

answered
0

hi,


In Mendix 10.24, the behavior you’re seeing is by design and matches the official Mendix documentation.

1) “Assign Variable” no longer exists

In recent Mendix versions (9 and 10), there is no separate Assign Variable activity.

The two supported variable activities are:

  • Create Variable — creates a new variable of a primitive data type
  • Change Variable — updates the value of an existing variable

This is documented under Variable Activities in the Mendix Reference Guide.

2) You cannot create an object variable with Create Variable

The Create Variable activity only supports the following data types:

  • Boolean
  • Enumeration
  • Decimal
  • Integer/Long
  • String
  • Date/DateTime
  • (any other Mendix primitive type)

Mendix does not allow you to select an entity object type in Create Variable. This is normal.

If you need an object variable (entity instance), you must use:

  • Create Object — to create a new instance of an entity
  • Retrieve — to get an existing entity instance from the database

These activities automatically create a variable of the appropriate entity type for use later in the microflow.

3) How you actually work with objects in a microflow

If your goal is to work with an entity instance, the correct pattern is:

  1. Create Object — this creates an object variable
  2. Change Object — to set or update attributes on that object
  3. Commit Object — to save it to the database (if needed)

This is documented under Object Activities in the Reference Guide.

  • The “Assign Variable” activity has been replaced by Change Variable in Mendix 10.
  • You cannot create an entity/object variable using Create Variable.
  • To work with objects, use Create Object or Retrieve, then Change Object.

This is the correct and supported way to manage variables and objects in microflows in Mendix 10.24 LTS.

answered