This article explains the use of the Related column for Update field.
The value of a dropdown field can be saved to a (custom) document property after a document is created. The document can then be saved to a third-party system like SharePoint. Now if in SharePoint the metadata is changed (for example the Product ID) and the document is opened again, then when the user clicks Update document, the value shown in the dropdown field will not reflect the actual value from the document.
This can be solved by setting the readback column in the Related column for Update field.
Readback is used to get the information from the document to assure that user can see the correct values in the form fields when using Update document.
Prerequisites
|
Important
|
Priority order across sources for readback
The priority order below applies across sources for readback:
- Custom XML Managed Metadata (e.g. SharePoint XML).
- Custom XML Value (e.g. SharePoint XML).
- Custom Document Property.
- Document Property.
- Content itself.
Important
|
Set the 'Related column for Update' step by step
Follow the steps below to set the Related column for Update field.
- On the Form tab create a new question and select Dropdown in the Type field.
- Select a Data source and Label column (e.g. 'Products' and 'Name').
- In Related column for Update select the data source column you want to use for readback (e.g. 'ID'). In other words: select the column where Update document refers to, when changes were made to the document in the background (e.g. by a third party system).
-
Click Add to form. The result looks like this:
Important
Backward compatibility is assured: by default, readback is done based on the Label column of the dropdown.
Example
In the example below the document is saved to SharePoint and this data source is used:
A template is created with a dropdown form field as shown in step 4 above, so with these values:
- Question title: 'Product'.
- Data source: 'Products'.
- Label column: 'Name'.
- Related column for Update: 'ID'.
The form fields are added to the template. The result looks like this:
On the Advanced tab two Custom Document Properties are created:
-
Property Name 'Product' with Property Value
{{Form.Product.Name}}
. -
Property Name 'Product ID' with Property Value
{{Form.Product.ID}}
.
The result looks like this:
Now a user creates a document with this template and selects 'Banana':
When the document is created these values are shown in the document (marked green) and are saved as custom document property (marked red):
After this the document is saved to SharePoint. Now in SharePoint the Product ID value '250' in the metadata is changed to '300'.
Then the user opens the document again in Templafy and clicks Update document. The Product dropdown will now show the value 'Pear', as the readback column is ID and the value from the same record is retrieved from the Name column. After the document is updated these values are shown (marked green):
Depending on the value set in the Related column for Update field, the results are as shown below after the document is updated (when in SharePoint the Product ID value '250' in the metadata is changed to '300'):
Related column for Update value | Result in dropdown after 'Update document' |
---|---|
Name | "Banana" |
ID | "Pear" |
Category | "Apple" |
Empty | "Banana" |
Important
|
Comments
Article is closed for comments.