XML export

See also: Object to server xml (Value resolver), Export (Event action)

Value resolver – Abstract

Purpose: Returns the content of an XML export for the reference object as text (string).


images/download/attachments/91131544/image2023-1-27_12-48-27-version-1-modificationdate-1674820107721-api-v2.png

The XML export value resolver returns the content of an XML export for the reference object as text (string). The input value is ignored.

  • For a single entity as input value the output text corresponds exactly to the content that the ribbon command 'Show Export/XML' (see Available commands) outputs in a new browser tab.

  • The return value is mostly (often exactly) the same as the return value of an Object to server xml value resolver that is passed the reference object as an input value.

NOTE◄ The XML export value resolver is not available in a Client workflow.

Differences between XML export and 'Server XML'


Differences in content between the return value of the XML export value resolver and a 'Server XML' for the same reference object (see Object to server xml) are due to the special processing by the ExportManager, from which only the XML export value resolver obtains its return value.

  • The XML export value resolver returns exactly the XML structure that an Export event action with the same reference object passes to the called profile.

  • The Object to server xml value resolver returns the XML structure that a Profile call value resolver with the same input value or a Call profile event action with the input value passes as a reference object to the called profile.

Example: For Documents, the 'Server XML' does not include the file content (documentContent), as this can be very extensive. When an XML export is performed, the ExportManager includes the corresponding 'Content' object in the XML.

Configuration

The XML export value resolver processes the reference object and ignores the input value.

The configuration does not use any parameters.

Example

An event handler shall display the XML 'raw data' of all address contacts stored in the address of the Company of session that belong to the Contact type 'Employee' (EMPLOYEE) via Show alert event action.

With this function, authorized users should be able to view the data entered into the company account via an interface without having to map all address characteristics in the input form for Company accounts.

Configuration:

In an event handler, a For each loop event action is parameterized as shown on the right:

  • In the Resolver for entities parameter, the list of contact addresses of all 'employees' of the registered company is obtained by the following value resolver chain:

    • The Company of session value resolver determines the company account used for login.

    • The Object property value resolver returns the 'Address' of the (address) of the company.

    • A Plural typed attribute resolver returns all instances of the 'Address contact' attribute with the Subtype 'Employee' (EMPLOYEE).

    • Our evaluation concerns the 'Address' (Address) stored per employee in the contactAddress field of the 'Address contact' attributes. The Collect values resolver extracts these addresses as a list from the list of all 'Employee' address contacts.

  • In the action block of the loop, there is an 'Address' as a reference object for each iteration, which is processed in a Show alert event action as follows:

    • The Title for the notification of the 'Alert' Type is formatted by Template value resolver starting from the reference object ('Address') in such a way that the localization for the Contact type 'Employee' appears followed by all 'Name' fields from the address.

    • In the Message, the XML export value resolver returns the 'Server XML' structure of the 'Employee' address to be displayed. The concatenated Replace text value resolver replaces all spaces in the 'Server XML' with character breaks here using the Regular expression? function to achieve a more compact and clear format of the structure in the popup (see runtime example below).

      NOTE◄ Simple formatting by replacing the spaces with line breaks should be avoided if the text features of the address itself may contain spaces. Here we assume that for address contacts the name fields are filled where no blanks are to be expected.

images/download/attachments/91131544/image2023-1-27_12-44-32-version-1-modificationdate-1674819872807-api-v2.png images/download/attachments/91131544/image2023-1-27_12-45-14-version-1-modificationdate-1674819914604-api-v2.png

Runtime example: Message with address data for an employee 'Jane Doe-Average'.

images/download/attachments/91131544/image2023-1-27_12-42-13-version-1-modificationdate-1674819733356-api-v2.png

  • The XML export shows all filled fields of the contact address stored in the company account, regardless of whether they are displayed in the data input form for the company account.

  • Specifically, the e-mail address stored in the 'Match code' field (accMatchCode) could be of interest here (see selection in screenshot), which can be copied from the displayed 'Alert' to the clipboard, for example.