Write Section
The write section impacts the display of the
properties in the Properties tab of the Properties
or Information panel. In the Write section, indicate
which attributes you want to display in the order of your choice, with
their read-only (RO) or read-write (RW) status, and their group (if
any). The order in which you specify the attributes in this section is
the order in which the attributes are displayed in the user
interface. In the Details section, add the other
characteristics for each attribute (authorized values, read-only or
read-write status, mandatory attribute, forbidden characters,
...).
Example: {
"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"
}
]
}
}
The write 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). 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"
|
| group |
The group the attribute belongs to. You
must define this group in the groups
section. If you do not specify any group for an
attribute, it is displayed under the Attributes group with
a 0 weight. For more information, see Groups Section. |
"group": "g2" |
Groups Section
The groups section impacts the display of the
groups of properties in the Properties tab of the
Properties or Information panel. In the groups section,
indicate the user interface name of the group, and its position
regarding the other groups.
Note:
This section is not included in default mask files. If you want to
use groups, you need to create it.
Example: {
"groups" :{
"g1" :{
"NLS" : "Group 1",
"weight" : 0
},
"g2" :{
"NLS" : "Group 2",
"weight" : 1
}
}
}
The groups section contains these parameters:
| Parameter |
Description |
Examples |
group_nameas specified for the
attributes in the write section. This
name must be unique.
|
NLS |
The name of the group as it will appear in
the user interface. |
"NLS" : "Group 1" |
| weight |
The weight of the group to indicate its
position regarding the other groups. Groups with a higher
weight are displayed first. By default, the weight is zero
(0). If the weight is the same for several groups,
or if it is zero (0), they are ordered alphabetically.
Note:
If you do not specify any group for an attribute in
the Write section, it belongs the
Default group (user interface name:
Attributes), with a zero (0) weight.
|
"weight" : 1In the
example above, Group 2 (weight 1) is displayed before
Group 1 (weight 2). |
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"
}
|