Create Section
The create section impacts the properties
available in the New … dialog boxes, in apps that support it. In the Create section, indicate
which attributes you want to display in the order of your choice, with
its read-only (RO) or read-write (RW) status. The order in which you
specify the attributes in this section is the order in which the
attributes are displayed in the user interface. Note:
When you add
customized attributes on multiple interfaces with Data Model
Customization, the attributes corresponding to the same interface are
always grouped. You cannot mix attributes corresponding to different
interfaces. For more information, see Attribute Order in New ... Dialog Boxes.
In the
Details section, add the other characteristics for
each attribute (authorized values, read-only or read-write status,
mandatory attribute, forbidden characters, ...)
Example: {
"Create": {
"attributes": [
{
"name":"V_Name",
"status": "RW"
},
{
"name":"V_description",
"status": "RO"
},
{
"name":"owner",
"status": "RW"
}
]
}
}
The create section contains these parameters:
| Parameter |
Description |
Examples |
| attributes |
name |
The internal name of the attribute |
"name":
"V_description" |
| status |
Specifies the editing status of the
attribute. For each attribute, indicate whether it is
read-only (RO) or editable
(RW). This status overrides the
status value in the Details section.
Note:
If an attribute is created as read-only, you cannot
indicate it as editable in the mask file.
|
- For read-only attributes:
"status":
"RO"
- For editable attributes:
"status":
"RW"
|
Details Section
The details section impacts the
behavior of the properties displayed in both the Properties
tab of the Properties or Information panel (Write section), and in
the New … dialog boxes in apps
that support it (Create section).
Example: {
"details": {
"attributes": {
"Title": {
mandatory": true,
"authorized_required": true,
"authorizedValues": ["My Title 1", "My Title 2"],
"applysort": true
"status": "RW"
},
"owner": {
"mandatory": true
},
"V_Name": {
"mandatory": true
},
"PLM_ExternalID": {
"forbiddenChar": "\\/:*?\"<>|#$@%,[]"
},
"V_Scale": {
"authorized_required": true,
"authorizedValues": [
"NormalScale",
"LargeScale",
"SmallScale",
"ExtraLargeScale"
]
},
"custom_att2": {
"hidden": true
},
"V_nature": {
"authorized_required": true,
"authorizedValues": [
"Definition",
"Specification",
"Presentation"
]
}
}
}
}
The details section contains
these parameters:
| Parameter |
Description |
Examples |
| attributes |
mandatory |
Specifies whether
the attribute is mandatory or not. For
each attribute, indicate
true if the attribute
is mandatory, or false
if it is not.
Notes:
- If an attribute is created as
mandatory, you cannot indicate it as
non-mandatory in the mask file.
- The mandatory constraint does not
apply to read-only attributes.
|
"mandatory":
true |
| hidden |
Hides the attribute
in the Properties tab. If set to
true, the attribute is
not displayed in the tab. If set to
false, the attribute is
displayed. This parameter enables
you, for example, to hide custom
attributes. |
"hidden":
true |
| forbiddenChar |
Specifies the list
of forbidden characters for the
attributes. For each editable
attribute, indicate the forbidden
characters |
"forbiddenChar":
"\\/:*?\"<>|#$@%,[]" |
| authorized_required |
If
authorized_required is
set to true, users can
only select values from the list of
authorized values that you specify in
authorizedValues
parameter.
If
authorized_required is
set to false, users can
select values from the list of
authorized values, or specify other
values.
|
"authorized_required":
true |
|
authorizedValues
|
Specifies the possible values for the
attribute.
If a list of possible values is
already defined in metadata (when you
create the attribute), you can use the
authorizedValues
parameter to restrict the possible
values to some of this list only. If you
add an authorizedValues
that is not in the original list, this
value is not displayed.
If there is no authorized value in
the metadata, you can specify any value
in this parameter.
For more information, see Deprecated Values for Custom Attributes.
|
"authorizedValues": [
"Definition",
"Specification",
"Presentation"
]
|
| applysort |
Specifies whether
the list of possible values (listed in
authorizedValues) is
sorted or not.If set to
true, the list of
possible values is sorted: If set to
false (default
behavior), the list of possible values
is not sorted. |
"applysort":
true |
| status |
Specifies the
editing status of the attribute. For
each attribute, indicate whether it is
read-only (RO) or
editable (RW). If
an attribute is created as read-only,
you cannot indicate it as editable in
the mask file.
|
"status":
"RW" |
Example
This example contains sections to customize the behavior of both the
Properties tab in the Information panel, and the
New … dialog boxes.
The Write and Group sections impact the
Properties tab only. The Create
section impacts New … dialog boxes only. The
Details section impacts both.
{
"Write": {
"attributes": [
{
"name": "Title",
"status": "RW"
},
{
"name": "V_Name",
"status": "RW"
},
{
"name": "PLM_ExternalID",
"group": "g1"
},
{
"name": "V_description",
"status": "RW"
},
{
"name": "owner",
"status": "RW"
},
{
"name": "V_Scale",
"status": "RO"
},
{
"name": "V_nature",
"status": "RO",
"group": "g2"
},
{
"name": "custom_att2"
}
]
},
"groups" :{
"g1" :{
"NLS" : "Group 1",
"weight" : 0
},
"g2" :{
"NLS" : "Group 2",
"weight" : 1
}
},
"Create": {
"attributes": [
{
"name":"V_Name",
"status": "RW"
},
{
"name":"V_description",
"status": "RO"
},
{
"name":"owner",
"status": "RW"
}
]
} ,
"details": {
"attributes": {
"Title": {
"mandatory": true,
"authorized_required": true,
"authorizedValues": ["My Title 1", "My Title 2"],
"applysort": true
},
"owner": {
"mandatory": true
},
"V_Name": {
"mandatory": true
},
"PLM_ExternalID": {
"forbiddenChar": "\\/:*?\"<>|#$@%,[]"
},
"V_Scale": {
"authorized_required": true,
"authorizedValues": [
"NormalScale",
"LargeScale",
"SmallScale",
"ExtraLargeScale"
]
},
"custom_att2": {
"hidden": true
},
"V_nature": {
"authorized_required": true,
"authorizedValues": [
"Definition",
"Specification",
"Presentation"
]
}
}
},
"revision":"0"
}
|