In numerous situations a user set profile value can become irrelevant. Consider the following example. 

Example

In a mortgage application information about the applicants' incomes is required. One of the incomes was entered as permanent contract full time, but it turned out to be a pension income. The fields belonging to the full-time contract are currently visible and are user set present in the profile. 

FieldField visibleField requiredValue

Currently

visible

Income typeAlwaysAlways'Wage labor'Yes
ProfessionIf Income type = 'Wage labor'If Income type = 'Wage labor''IT analyst'Yes
Gross salaryIf Income type = 'Wage labor'If Income type = 'Wage labor'€ 50.000Yes


The user changes the value of field Income type from 'Wage labor' to 'Pension income'Both the fields Profession and Gross salary are no longer visible on screen. A new field becomes visible: Pension Income. The user enters a value for this new field.

FieldField visibleField requiredValue

Currently

visible

Income typeAlwaysAlways'Pension income'Yes
ProfessionIf Income type = 'Wage labor'If Income type = 'Wage labor''IT analyst'No
Gross salaryIf Income type = 'Wage labor'If Income type = 'Wage labor'€ 50.000No
Pension incomeIf Income type = 'Pension income'If Income type = 'Pension income'€ 50.000Yes


Although the values of the fields Profession and Gross salary are not visible nor required anymore, they are still present in the profile. They might not do any harm, but saving them in a database to be collected later or when the profile values are used in a data mapping to another system, could cause problems. 

The example above illustrates what is meant with irrelevant profile values. Question is, are they problematic?

When do irrelevant profile values become a problem?

Irrelevant profile values are not always a problem. For instance, if only a document is generated and the document contains the same conditions as on screen. Or, when irrelevant values will not be processed by or saved to another system. Or, when irrelevant values are not used in any calculations or other logic etc. Hence, not every application has to deal with irrelevant profile values and if there are no conditional fields it might even be possible they never occur. These irrelevant profile values may even be desired to keep for a while in the profile, as the user might change the answers so that these values become relevant again. In that case the application remember the information, and the user does not need to fill in the data again.

Manage irrelevant profile values

There are multiple ways to deal with irrelevant values.

Clear irrelevant values with a (sequence of) service call(s)

When clearing irrelevant values can wait until the page is left, for instance when navigating to a next step in the application, you can model a service call or flow to clear irrelevant values using the Service call type: AQ_Instance_Update. An example is shown below. Field Income type determines which fields are cleared in the conditional node. You could use sub flows containing the Service call type: AQ_Instance_Update as in the example below or service calls directly. As in the example above Income type has been changed from 'Wage labor' to 'Pension income'which will result in clearing all values for specific fields for 'Wage labor' and for instance 'Freelance'Any general fields, possibly a starting date or duration, will remain unchanged. 

Example flow

Example Instance update service call

Create reusable expressions to use in preconditions on your page and in the flows for clearing irrelevant values. 


Clear irrelevant values with a Flow on Refresh container

When clearing irrelevant values cannot wait until the page is left, for instance when the values are used in calculations on the same page, you can model a service call and flow to clear irrelevant values using the Service call type: AQ_Instance_Update service type and call this flow with a FlowOnRefresh container type. Often, however, this will not be necessary when using adequate logic in the expressions, making it more robust. 

Keep irrelevant profile values, apply logic

In some situations it might be possible to just keep the irrelevant values in your profile and deal with them by writing adequate expressions. For instance, you could make sure Profession is not used in a datamapping whenever income type is not 'Wage labor'.



  • No labels