REFERRING USER PROFILE ATTRIBUTES IN A FORM
While creating users accounts in User Management connector, some profile related information is stored in the system. Below we have illustrated how you can consume this information in the form.
To show Display Name in a form:
To show email address in a form:
To show login ID in a form:
To show Department in a form:
GENERATING A UNIQUE ID OFFLINE
Many times we need to assign a unique identity to a form being submitted through makeen transform. Since makeen transform can work in offline mode as well, and generating a unique identity which remains unique for all records submitted by all users can turn out to be a tricky job. We recommend following expressions to meet this requirement:
This expression would generate a sequence number similar to this:
TO FIND TEXT IN MULTI SELECT SEGMENTED CONTROL OUTPUT
Segmented control is among the key controls that shape great user experience in transform apps. While working with a multi-select segmented control you may need to configure some rules based on the selection a user would make through a segmented control.
Below expression helps you find a given text against the selection outcome of a segmented control.
USING MULTI SELECT SEGMENTED CONTROL AS RECIPIENTS LIST
At the time of submitting a form, you may want to present a list of recipients to the user to who the email notification shall be sent to. This list can be easily created using a segmented control.
Following expression can be used to extract semicolon separated email addresses from the segmented control output.
CALCULATING DIFFERENCE BETWEEN DATE & TIME
In order to record duration of an activity, usually start and end time are recorded in the app, and the difference between two points in time is calculated. It is depicted in the snapshot below:
Following expression can help you calculate the interval in the above scenario.
Math_Round((ToDate(Controls["dpActivityEndDate"].Date.ToString().Split(" ")+" "+Controls["tpActivityEndTime"].Time.ToString())-ToDate(Controls["dpActivityStartDate"].Date.ToString().Split(" ")+" "+Controls["tpActivityStartTime"].Time.ToString())).TotalMinutes, 0)
SORTING RECORDS IN A REPEATER CONTROL
In makeen transform Repeater control is a multipurpose UI element that is used in many ways. One of the major uses is to list records on a page from a database. You can apply various types of sorting on the records listed under a repeater control. Here we have mentioned an example where records are sorted in reverse chronological order with respect to time stamp..
Entity["notes"].FindAll((["ComponentID"]+"")=Controls["ComponentID"].Text & (["ProjectID"]+"")=Controls["ProjectID"].Text).OrderBy(["TimeStamp"] desc)
STORING DEVICE ID WITH FORM
In order to keep complete track of a record, sometimes it is required to store device unique identity along with the forms data submitted through that device. This can be achieved through following expression.
RECORDING FORM VERSION FOR AUDIT CONTROL
For version is an important piece of information especially for troubleshooting purposes. Here is how you can capture form verison.
RECORDING FORM NAME
Likewise you can record Form Name along with the rest of the data.
RECORDING APP NAME
If needed, app name can also be recorded through this expression.
Below you can find a detailed list of functions that you can apply while writing an expression.
GENERAL PURPOSE FUNCTION