Mail address user
See also: Mail address guest user value resolver
Value resolver – Abstract
Purpose: This value resolver searches the communication information attributes in the address of the logged in or an explicitly selected user for entries for the Communication type 'E-mail' with the specified context and returns a list of the e-mail addresses found.
The Mail address user value resolver searches the communication information attributes in the address of a given user account for entries of the 'E-mail' (EMAIL) Communication type with the specified 'Context'.
If the User parameter refers to a specific user account (see Users), its address (address) field is evaluated.
If there is no selection for the User, then the evaluation is performed for the Current user, which may differ from the actual login context within a Run as event action.
The input value is irrelevant for this value resolver.
If successful, the return value of the value resolver is a list of strings (string[]) containing all non-empty values of communication information attributes of the searched address whose context (communicationContext) exactly matches (including case sensitivity) the value in the Context communication info parameter.
►NOTE◄ Even a single match is returned as an element of a list, so a value resolver (e.g. List item or Rule list resolver) may be needed to directly access the single value. However, this does not matter in the typical environment within a E-Mail event action, since strings or lists of strings are accepted there when addressing e-mails (in the 'Recipient', 'CC' and 'BCC' parameters).
The return value of the resolver, on the other hand, is 'No value' (null) if at least one of the following conditions applies:
No selection has been made for the User parameter and in the context of the value resolver, Current user indicates a Guest users. This is the case if all of the following conditions are met:
A guest user (see Guest users and Mail address guest user, if applicable) is logged in to the current session.
The value resolver is not executed (directly or indirectly) within a Run as event action that explicitly and temporarily defines a full user (see Users) as Current user.
There is a reference to a user account (via the User parameter, the session, or an explicit selection in a Run as event action in the direct or indirect execution context of the value resolver), but does not have a communication information attribute in that user account that satisfies all of the following conditions:
The attribute refers to the Communication type 'E-mail' (EMAIL) in the 'Type' (communicationType) field.
The attribute refers exactly to the value in the Context parameter of the value resolver in the 'Context field' (communicationContext).
The attribute defines any text in the 'Value' field (communicationValue).
►NOTE◄ Whether this text meets formal criteria for an e-mail address is not examined. However, the 'example' below demonstrates how 'supposed e-mail addresses' can be subsequently made feasible.
►NOTE◄ The evaluation of the user account address by the Mail address user value resolver is performed without any regard to access restrictions that apply in the execution context (Role of session, Company of session, Run as) for the relevant user account. The value resolver can therefore also access the communication information of users that do not appear, for example, in a Search or overview with the same login data.
Configuration
The Context communication info parameter must be filled with any static text as a required field. The value resolver only returns values from communication information whose 'context' (communicationContext) matches the value specified here exactly (incl. upper/lower case). ►NOTE◄ Since the parameter cannot be left 'empty', the value resolver categorically does not consider communication information without context. The optional User parameter allows a single selection from the Users list. As can be seen in the image, the Combobox element supports a search function. If no user is selected, then the evaluation refers to the Current user valid in the context of the value resolver, unless it is a guest user. ►IMPORTANT◄ During configuration, only users with read-only access at the minimum in the current session appear in the drop-down list. If an existing configuration refers to a user for whom there is no read access in the current session, the label appears as 'hidden – User'. At runtime, read access is irrelevant for the configuration behaviour. |
|
Example
Association criteria (see Association criteria) checks whether the account of the currently logged in user contains at least one piece of communication information of the 'E-mail' EMAIL Communication type for which the context is 'registration' and whose 'value' (communicationValue) meets the formal criteria for an e-mail address.
Configuration:
The association criteria is configured as shown on the right:
►NOTE◄ If the Current user in the execution context of the value resolver refers to a guest user (see Guest users), the Mail address user value resolver always returns 'no value' (null). Then the association criteria is considered as 'failed'. So the configured rule implies the check if a 'full' user is considered as Current user. |
|
The image on the right shows in detail the Rule list resolver configured for the example:
►NOTE◄ The regular expression used as the Search text in the example is deliberately crude and therefore 'fallible' as far as the distinction between acceptable and unacceptable e-mail addresses is concerned. It can be replaced by any custom expression that covers specific requirements more precisely. In particular, control over the characters allowed to be used for the username and domain between the required components ('@' and '.') should be stricter. Currently, only spaces ('\s') and the @ symbol ('@') are excluded. |
|