Articles in this section

How to set the 'Related column for Update' of a Dropdown form field

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

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in (7.2.104 or above) installed
  • Space owner access to the Templafy tenant.

  Important

  • The readback is not limited to metadata.
  • The former readback functionality was sufficient when the value of a dropdown was used in a binding and then used for readback. With the new functionality not only the value of a dropdown, but also dropdown-driven data coming from another column of the same data source can be used in a binding and then used for readback.

Priority order across sources for readback

The priority order below applies across sources for readback:

  1. Custom XML Managed Metadata (e.g. SharePoint XML).
  2. Custom XML Value (e.g. SharePoint XML).
  3. Custom Document Property.
  4. Document Property.
  5. Content itself.

  Important

  • In case of Content itself: when the document is updated then form field values only read values from content controls in the body of the document, not from headers or footers!
  • Readback from headers or footers is not supported.
  • Readback is not supported for text elements (only form data entries are used).
  • Readback is also not supported for email elements, slides and slide elements.
  • If none of the options 1-5 above is possible, then the source of readback is form data entries (the value selected interactively by the user the last time in the dynamic form).

Set the 'Related column for Update' step by step

Follow the steps below to set the Related column for Update field.

  1. On the Form tab create a new question and select Dropdown in the Type field.
  2. Select a Data source and Label column (e.g. 'Products' and 'Name').
  3. 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).
  4. Click Add to form. The result looks like this:

    relatedcolumnforupdate.png

     

      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:

rc_datasource.png

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:

contentcontrols.png

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:

advancedcustomdocumentproperty.png

Now a user creates a document with this template and selects 'Banana':

product.png

When the document is created these values are shown in the document (marked green) and are saved as custom document property (marked red):

documentproperties.png

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):

productupdate.png

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

  • When the Related column for Update value is set to the same value as used in Label column (in this example the value 'Name') then the result (in this example 'Banana') is the same as when the field Related column for Update is left empty.

    Tip: only use the Related column for Update field if you want to use a different column then the column that is set in the Label column field.

  • When the Related column for Update value is 'Category' then the dropdown value shows the first value ('Apple') of the data source because the 'Category' is not saved as metadata (on the Advanced tab no Custom Document Property was created for 'Category').
  • When the Related column for Update value is empty then Templafy will use the default readback (the Label column of the dropdown), so the result is 'Banana'.
colors checkbox datasources concat currency calculate date tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.