Plans
In the Designer, the plan features can be implemented in the workbook to provide users access to the plans as in the Filler and the Portal. This section of the documentation covers the features of the plan used by the designer.
Plan Modeβ
There are several settings in the Designer for the plan-feature. The first one is a general setting of the workbook. Therefore, you can find it by selecting the workbook in the left Explorer area.
Plan mode | |
---|---|
Modifiable | The user can see the plans and modify them in the Filler and in the checklist view of an open inspection |
Hidden | The user can not see the plans |
Question Fieldsβ
Planβ
Plan | Description |
---|---|
Object Id | Unique id of the object the plan belongs to. It is a connection between a object and the plan, therefore it must be the id of an existing object |
Plan size | Specify the expected quality of the plan image. Large: 2048x1440 pixels(~350kb per image) Uncompressed: original size of plan image file |
Locate Item On Planβ
Locate item on plan | Description |
---|---|
Display text | The text that a location is labeled with, when placing on a plan |
Plan item id | Unique id of the item that is located on the plan. Usually bonded to an object or defect content item id, but is allowed to be any text. Make sure to make it unique, for example a guid |
Color | Specifies the color of the pin/polygon in HEX code. |
Plan | The plan on which the item is placed. |
Location mode | Specifies how the item should be placed on the plan. Can be a pin (a point), polygon (an area) or both which means the user can choose between pin and polygon when placing the item on the plan. |
Defining Content Typesβ
Content Fieldsβ
There are two content fields belonging to the plan feature. These content fields are specified with the "type" name.
With the field of type Plan
you can store a plan for some content item.
In order to store the location of an item on a plan, you need the field of type PlanLocation
In case you need to map a checklist question to those fields:
- The value "Plan" is for the "Plan" question
- and "PlanLocation" is for the "Locate on item plan" question.
:::Note
In case you use a PlanLocation
field, you will also have to define the planLocationFeature
:::
{
"$type": "contentField",
"type": "Plan",
"name": "plan",
"displayName": "Plan"
},
{
"$type": "contentField",
"type": "PlanLocation",
"name": "location",
"displayName": "Location"
}
Configuring the planLocation
featureβ
To locate a defect in a plan, the plan location feature has to be defined in the features
array.
It has to be a type "planLocation"
and defines where the iCL system can get the information it needs to render this particular item on a plan.
It does so by either specifying the name of a field, which contains the required information (such as "planFieldName"
or "displayTextFieldName"
), a constant value (such as "planLocationMode"
) or an EcmaScript expression (such as "colorExpression"
Field | Description |
---|---|
planFieldName | The name of the field storing the plan |
planLocationFieldName | The name of the field storing the location |
displayTextFieldName | The name of the field which should be used as a short description on the plan |
planLocationMode | a location can either be stored as a point or a polygon (for areas). 0... the location will be a point, 1... the location will be a polygon, 2... the user can decide |
colorExpression | Either an RGB color (e.g. #FF0000 ) or an EcmaScript expression to dynamically define the color (e.g. =(status==0 ? '#FF0000' : '#00FF00') ... if the status is "open", then show in red, otherwwise in green |
statusFieldName | β³ reserved for future use |
descriptionFieldName | β³ reserved for future use: The name of the field that should be used for longer description texts |
isHiddenFieldName | β³ reserved for future use: The name of the field that stores whether an item should be rendered on plan or not |
itemTemplate | β³ reserved for future use |
"features": [
{
"$type": "planLocation",
"planFieldName": "plan",
"planLocationFieldName": "location",
"displayTextFieldName": "defect_number",
"planLocationMode": 2
"colorExpression" : "#d62d2d"
}
],
It is also possible to store more information into this. Like the description, but make sure to write also a content field named "description".
"features": [
{
"$type": "planLocation",
"planFieldName": "plan",
"planLocationFieldName": "location",
"displayTextFieldName": "defect_number",
"planLocationMode": 2
"colorExpression" : "=(status==0 ? '#FF0000' : '#00FF00')",
"descriptionFieldName" : "description"
}
],