Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
73:workspaces [2019/03/25 16:47] – emr | 73:workspaces [2019/03/25 16:50] – emr | ||
---|---|---|---|
Line 13: | Line 13: | ||
Workspaces can now have specific attributes. Administrators can globally define possible attributes via the '' | Workspaces can now have specific attributes. Administrators can globally define possible attributes via the '' | ||
- | [[{{: | + | {{ : |
Attributes can be of type string or selection. Here is an example of how to define a selection and its possible values: | Attributes can be of type string or selection. Here is an example of how to define a selection and its possible values: | ||
- | [[{{: | + | {{ : |
After defining the attributes, they can be used in individual workspaces. To set an attribute to a specific value for a workspace, use the '' | After defining the attributes, they can be used in individual workspaces. To set an attribute to a specific value for a workspace, use the '' | ||
- | [[{{: | + | {{ : |
In Stages 7.3, the workspace attributes can be used in scripts, e.g. to select only a specific set of workspaces: | In Stages 7.3, the workspace attributes can be used in scripts, e.g. to select only a specific set of workspaces: | ||
- | < | + | < |
+ | var workspace = stages.getProjectByPath(workspacePath); | ||
var modelYearAttribute = workspace.getAttribute(" | var modelYearAttribute = workspace.getAttribute(" | ||
var modelYearAttributeValue = modelYearAttribute.getProperty(" | var modelYearAttributeValue = modelYearAttribute.getProperty(" | ||
Line 32: | Line 33: | ||
... | ... | ||
} | } | ||
- | |||
</ | </ | ||