Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
73:workspaces [2019/03/25 16:46] – created emr73:workspaces [2019/03/25 16:47] emr
Line 11: Line 11:
 ===== Use Workspace Attributes ===== ===== Use Workspace Attributes =====
  
-...+Workspaces can now have specific attributesAdministrators can globally define possible attributes via the ''Administration > Workspaces > … > Configure Workspace Attributes'' menu in __any__ workspace: 
 + 
 +[[{{:73:workspaceattributes-listattributes.png?direct&798x217}}|]] 
 + 
 +Attributes can be of type string or selection. Here is an example of how to define a selection and its possible values: 
 + 
 +[[{{:73:workspaceattributes-defineselection.png?direct&799x416}}|]] 
 + 
 +After defining the attributes, they can be used in individual workspaces. To set an attribute to a specific value for a workspace, use the ''Edit'' menu for that workspace and switch to the ''Attributes'' tab: 
 + 
 +[[{{:73:workspaceattributes-selectattributes.png?direct&800x276}}|]] 
 + 
 +In Stages 7.3, the workspace attributes can be used in scripts, e.g. to select only a specific set of workspaces: 
 + 
 +<code>var workspace = stages.getProjectByPath(workspacePath); 
 +var modelYearAttribute = workspace.getAttribute("modelYear"); 
 +var modelYearAttributeValue = modelYearAttribute.getProperty("databaseValue"); 
 + 
 +if (modelYearAttributeValue == "2020") { 
 +   ... 
 +
 + 
 +</code> 
 + 
 +Future versions of Stages will make use of those attributes to allow end users to easier find their workspaces.