2020 Apr 02 8:01 AM - edited 2024 Feb 03 6:42 PM
when we should use initial="true" in the modifier tag of an itemtype?what is the benefit of using this tag?
Request clarification before answering.
Hi, Hari Prasad,
initial = "true" means that you definitely need to fill out this attribute when creating the model. Otherwise, you cannot save the model.
It’s very important to do so for the attributes that can be used as indexes in the database, such as product code, UID, etc.
The advantage of using this modifier is data management. You can be sure that when creating new objects, this attribute is filled.
It’s also good practice to use initial="true" with a default value.
It’s especially relevant for boolean values. To avoid the setting null to the boolean field, you can define a default value "true" or "false" for this field.
Also, it’s good practice to use this modifier with <write="false"> modifier for data that should remain unchanged after its creation. This modifier will not allow you to change the value after creating the model.
I hope this answers your question.
Best regards,
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.