How do assign a null value to a variable of an entity's Datatype? with multiple fields.
Hi Nicolás.
I know two ways.
The first one you can assign null to each field of the variable:
In an assign for example:
entity.att1 = nullidentifier ();
entity.att2 = "";
The second is to create another variable with the same datatype and assign it the entire one you want to clear.
and in the assign do:
VarEntity01 = VarEntity02;
Hello Nicolas,
You cant set null to a entity's datatype variable, however i assume you want to clear the variable to be able to do some logic. You can do it by below options,
You can clear all the attributes in the variable of entity's datatype to Default Out systems NullIdentifier() or NullTextIdentifier(), etc.
One other way to do it is have a local variable of entity's datatype on your action and do not assign any value to it. When you want to clear your variable, assign the values from the unused local variable to your variable which you want to cleanup.
Thanks,
Babu
In my case when an object has 10 attributes it would make it painful to null each attribute programmatically. Especially if you have several objects similar to that . I was thinking about an alternative approach as to create a list of that datatype. And then clear that list when needed, and then append a new value when needed. And access it through the List.Current value.