Setting a new instance of record / structure

Setting a new instance of record / structure

  

Hi,

When a variable is of an entity record type or of a structure type it is initially set to an instance of the required type. Is it possible to set this variable to a brand new instance? It would be useful, for example, in a loop for creating a set of entity records.

Regards
Tomasz
Tomasz,

You can always use 2 variables, one that you leave untouched (something like BlankEntity) and when needed assign the Entity := BlankEntity

Not sure if that is what you looking for

Best regards,
PC

PC,

Do you mean that Entity = BlankEntity creates a copy of BlankEntity?

Regards
Tomasz
Yes, Entity will have it's values changed to whatever is in BlankEntity, thus the leaving BlankEntity untouched will ensure you will have Entity with default vaules when you do the assign

Best regards,
PC

It works :-) Thanks.

Regards
Tomasz
Glad to be of assistance :)

Best regards,
PC