This is the documentation for ConfiForms Server/Data Center app
However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.
See if the function is available for ConfiForms CLOUD - CLOUD
In order to make it easier to integrate with other external systems, such as JIRA, for example, we have implemented so called "virtual" functions, what you can call on field values.
Usage:
Useful, when you try to prepare a JSON or some other format when used together with IFTTT macro to enable integrations with other systems
See also Accessing field values and properties. You can use complex properties in your filters. For example filtering dropdown fields by values and by labels, filtering page type fields by page metadata fields, filtering user fields by, for example - email property
As of now, the following functions are supported:
CORE - means the function is available from ConfiForms 1.x
Function | Description | Using in ConfiForms Field macro | Using in ListVIew/PlanView/CalendarView or in IFTTT macro body | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
urlencode | Does URL encode on given value, see "urlEncode" method in | myfield. urlencode | [entry.myfield.urlencode] | ||||||||||
escapeXML | Escapes XML on given value, see "escapeXml" method in | myfield. escapeXml | [entry.myfield. escapeXml] | ||||||||||
escape | Escapes string as in "escapeForHtmlAttribute" method in | myfield.escapeForHtmlAttribute | [entry.myfield.escapeForHtmlAttribute] | ||||||||||
escapeJavaScript | Escapes JavaScript from the value | ||||||||||||
formatDate Example: formatDate(MM-dd-yyyy, UTC) | Tries to format date fields in the specified format, expects date format as in http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html | myfield.formatDate(JAVA_FORMAT) | [entry.myfield.formatDate(JAVA_FORMAT) ] (no quotes) | ||||||||||
jiraDate FROM V. 2.12.5 jiraDate(America/Chicago) | Same as "formatDate" method above, but specifies constant DateFormat pattern (yyyy-MM-dd), suitable for JIRA REST API | myfield.jiraDate | [entry.myfield.jiraDate] | ||||||||||
jiraDateTime FROM V. 2.12.5 jiraDateTime(UTC) | Same as " formatDate " method above, but specifies constant dateformat pattern ("yyyy-MM-dd'T'HH:mm:ss.SSSZ"), should be compatible with ISO 8601 standard as JIRA requires when setting timestamps to JIRA fields | myfield.jiraDateTime | [entry.myfield.jiraDateTime] | ||||||||||
escapeJSON | Escapes illegal characters in the field value to generate a valid JSON property. New lines, quotes, tabs and etc will be properly escaped [entry.myfield.escapeJSON] | myfield.escapeJSON | [entry.myfield.escapeJSON ] | ||||||||||
asArray asArrayMultiSelect asArrayMultiUserPicker | Tries to create an array from the value. Useful when you want to pass ConfiForms multi-select values to JIRA. Something like "customfield_XXXX" : [[entry.myfield.asArray]] this will generate "customfield_XXXX" : ["val1","val2"] assuming "myfield" field is a multi select and has 2 values: val1 and val2 There are variations to support other multi-select fields in JIRA
| myfield.asArray myfield.asArrayMultiSelect myfield.asArrayMultiUserPicker | [entry.myfield.asArray] [entry.myfield.asArrayMultiSelect] [entry.myfield.asArrayMultiUserPicker] | ||||||||||
asArray(separator) FROM V. 1.35 CLOUD | Same as "asArray" without a parameter, but allows you to set own separator Example: asArray(') will wrap the values into list of 'v1', 'v2'... asArray will do the same with default separator ", like this "v1", "v2" asArray(_) will output _v1_, _v2_ | myfield.asArray(separator) | [entry.myfield.asArray(separator)] | ||||||||||
asArrayOfIds CORE CLOUD | Same as the above, but exporting IDs of the multi-select values in the following format: "1", "2" | myfield.asArrayOfIds | [entry.myfield.asArrayOfIds] | ||||||||||
asArrayOfKVPairs(key) FROM V. 1.35 CLOUD | Will output the list of values in a format: {"key":"value"}, {"key": "value2"} Useful for adding JIRA labels, like when giving a key as "add" → asArrayOfKVPairs(add) {"add": "value"}, {"add", "value2"} | [entry.asArrayOfKVPairs(key)] will produce something like {"key":"value"}, {"key": "value2"} | |||||||||||
replaceCRLFWithBR | Replaces CR/LF with <br/> tag to show with line brakes in HTML (useful when you reference the textarea field using [entry.] notation) | myfield.replaceCRLFWithBR | [entry.myfield.replaceCRLFWithBR] | ||||||||||
replaceBRWithCRLF | Does the opposite to "replaceCRLFWithBR" and replaces <br/> tags with CRLF | ||||||||||||
asUserFullNames | Works only with User multi-select fields and shows list of full names for selected users | myfield. asUserFullNames | [entry.myfield.asUserFullNames] | ||||||||||
asUserEmails | Works only with User multi-select fields and shows list of emails for selected users | myfield. asUserEmails | [entry.myfield.asUserEmails] | ||||||||||
asUserNames | Works only with User multi-select fields and shows list of usernames for selected users | myfield.asUserNames | [entry.myfield.asUserNames] | ||||||||||
friendlyDate | Formatting date and date/time field types with https://docs.atlassian.com/confluence/latest/com/atlassian/confluence/core/datetime/FriendlyDateFormatter.html | myfield. friendlyDate | [entry.myfield. friendlyDate ] | ||||||||||
asCount | Returns size of a collection for multi-value fields or number of chars for other types | myfield.asCount | [entry.myfield.asCount] | ||||||||||
asSize | Returns size of a collection for multi-value fields or number of chars for other types (same as "count") | myfield.asSize | [entry. myfield.asSize] | ||||||||||
asLength | Returns size of a collection for multi-value fields or number of chars for other types | myfield.asLength | [entry. myfield.asLength] | ||||||||||
formatCurrency | Tries to format value as currency using either default or given format https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html If value could not be formatted according to given format then value will be returned as is Can be used with any number (and not only currency) | myfield.formatCurrency(JAVA_FORMAT) myfield.formatCurrency() (default decimal format is used if empty) | [entry.myfield.formatCurrency(JAVA_FORMAT)] (no quotes, JAVA_FORMAT could be empty, default will be used) [entry.myfield.formatCurrency(# ###.##)] [entry.myfield.formatCurrency(# ###.00)] | ||||||||||
formatNumber | alias to formatCurrency | myfield.formatNumber(JAVA_FORMAT) myfield.formatNumber() (default decimal format is used if empty) | [entry.myfield.formatNumber(JAVA_FORMAT)] [entry.myfield.formatNumber(# ###.##)] [entry.myfield.formatNumber(# ###.00)] | ||||||||||
asFilteredBy(FILTER) | Very powerful function to extract the value by given filter (mostly used for multi-value fields). Especially useful with Multi-select fields which are of type "smart fields", the ones referencing other forms and fields Example: You have one form which has a field called "mf" which holds multi-value references to another form which has the following fields: name, surname, position Then... when showing the data from the first form you can actually show only specific choices. For example:
| entry.mf.asFilteredBy(FILTER) | Filter should be in a format: property:filter [entry.mf.asFilteredBy(name:Alex)] The following filters are supported:
| ||||||||||
trimAllSpaces | Removes all the spaces in the field value. Can be used when creating page labels automatically from ConfiForms field values and want to ensure the value is taken as a label and not split by spaces into differenet labels | entry.myfield.trimAllSpaces | [entry.myfield.trimAllSpaces] | ||||||||||
camelCase | Makes a CamelCase string from a given value | entry.myfield. camelCase | [entry.myfield. camelCase] | ||||||||||
camelCaseAndTrim | Makes a CamelCase string from a given value and, additionally, removes all the spaces | entry.myfield. camelCaseAndTrim | [entry.myfield. camelCaseAndTrim] | ||||||||||
addCRLF CORE CLOUD | Adds CR and LF characters after the value | entry.addCRLF | [entry.addCRLF] | ||||||||||
addCRLFHtml CORE CLOUD | Adds <br/> (brake) after the value in HTML format | entry.addCRLFHtml | [entry.addCRLFHtml] | ||||||||||
trunc(NUMBER) CORE CLOUD truncLeft(NUMBER) CORE CLOUD truncRight(NUMBER) CORE CLOUD | Truncates the value. Leaves "n" first symbols | entry.trunc(100) | [entry.trunc(100)] | ||||||||||
trim(NUMBER) trim() - will trim the value from leading/trailing spaces CORE CLOUD trimLeft(NUMBER) CORE CLOUD | Trims the value, Skips "n" first symbols | entry.trim(10) | [entry.trim(10)] | ||||||||||
trimRight(NUMBER) CORE CLOUD | Trims the value, Removes "n" last symbols | ||||||||||||
asAttachment asAttachment(n) CORE | You can reference a particular attachment stored in Confluence and linked though ConfiForms Field (either File or Attachment picker) n - is the index of the attachment stored/linked using ConfiForms Field. Index starts with 0. When no index is specified, then the 1st attachment is taken (1st attachment is stored with index 0) This means that asAttachment = asAttachment(0) This function is a "bridge" to get other properties of the attachment stored. See below. | entry.asAttachment | [entry.asAttachment] [entry.asAttachment(0)] [ entry.asAttachment(1) ] | ||||||||||
asAttachment.base64 asAttachment(1).base64 CORE | Returns bas64 encoded string of the file contents in this attachment | entry.asAttachment.base64 | [entry.asAttachment.base64] [entry.asAttachment(0).base64] [entry.asAttachment(1).base64] | ||||||||||
asAttachment.ANY_PROPERTY asAttachment(n).ANY_PROPERTY CORE | Where ANY_PROPERTY is the "get" methods of the class Attachment https://docs.atlassian.com/confluence/5.9.1/com/atlassian/confluence/pages/Attachment.html Examples: asAttachment.displayTitle asAttachment.id asAttachment.downloadPath asAttachment.contentType and many other properties of the Attachment object asAttachment(1).displayTitle - also perfectly valid and will try to get the display title for the attachment stored "second" in the field | ||||||||||||
asUsers FROM V. 1.39.2 | Converts multi-user / multi-owner (ownedBy field in ConfiForms) field values to list of user objects, which can be then transformed into the desired output as needed, for example: ownedBy.asUsers.transform(email) Any property of the User object (see below) is accessible | ||||||||||||
asUser.username asUser.fullName asUser.email asUser(n).username asUser(n).fullName asUser(n).email CORE | When working with multi-select user control/field and want to get a particular user info Only works with Multi-select user field! | ||||||||||||
asEntryRef(REF_TO_ENTRY) CORE CLOUD | Example: This will return When this is necessary? The use case is when you use it within an IFTTT or have a ListView which has another ListView inside and you want to prevent ConfiForms from applying the context variables onto the sub-lists The function can be used with any field type (as long as the field exists) and actually the following constructions are perfectly valid As you can see we apply the function on the same ID field (exists in every ConfiForms record) and the parameter you give in is the important bit in all this... So, the parameter (PARAM) you give to asEntryRef is wrapped into the brackets and returned: You can also use "_func" pseoudo property of a record as a bridge to "asEntryRef" function when the "id" is not available (assigned) This is always available | ||||||||||||
asVelocityExpRef(VALUE) FROM V. 1.50.1 CLOUD | Same as asEntryRef, and asIFTTTRef, but returns a value wrapped in ${}, like ${VALUE} | ||||||||||||
asJSON CORE CLOUD | Converts a value to JSON and allows to access JSON object properties | entry.myfield.asJSON.someJSONProperty entry.myfield.asJSON.anotherJSONProperty | |||||||||||
asRef(VALUE) FROM V. 1.53.8 CLOUD | Same as asEntryRef, and asIFTTTRef, but returns the exact experssion as you have put inside the arguments asRef(VALUE) will return VALUE | ||||||||||||
asUserProfile | Converts to User profile (or tries to, if a given field value can be resulved as a user object) Available user profile properties (all standard ones, available in the profile) to reference are:
| entry.somefield.asUserProfile.phone entry.somefield.asUserProfile.im entry.somefield.asUserProfile.website entry.somefield.asUserProfile.position entry.somefield.asUserProfile.department entry.somefield.asUserProfile.location where " somefield " should get resolved into username (can be user field) | [entry.somefield.asUserProfile.phone] [entry.somefield.asUserProfile.im] [entry.somefield.asUserProfile.website] [entry.somefield.asUserProfile.position] [entry.somefield.asUserProfile.department] [entry.somefield.asUserProfile.location] | ||||||||||
asList CORE CLOUD | Extracts values of a list and converts to a comma-separated string, see below for examples on transform and asList | ||||||||||||
asAttachments CORE | Converts the file/attachment field values into the array of Attachment objects https://docs.atlassian.com/confluence/5.9.1/com/atlassian/confluence/pages/Attachment.html | ||||||||||||
transform(property_name) CORE CLOUD | Converts the list of some objects into the list of values for the given property For example: [entry.myfile.asAttachments.transform(id)] When "myfile" is a field of type file/attachment, a function "asAttachments" will convert it's values into the list of Attachments objects and then function "transform" will extract and "id" property of each Attachment object and will put it into the resulting list [entry.myfile.asAttachments.transform(id).asList] Same as in previous example, but we convert the otput into a comma separated list of attachment IDs Below, is another example, which returns a result of ID's, but wrapped into quotes [entry.myfile.asAttachments.transform(id).asArray] Function "transform" can be used on a multi-value field.(on Multi-select fields, which hold the structure of ID and LABEL (properties "id" and "label")) See Accessing field values and properties and dropdown fields For example, to get the list of dropdown IDs [entry.mymultifield.transform(id)] To get the list of dropdown labels [entry.mymultifield.transform(label)] To get the list of User's full names for multi-user field (User field has properties: fullName, username, email, lastName, firstname) See Accessing field values and properties [entry.mymultiuserfield.transform(fullName)] same as above, but in "coma-separated" string [entry.mymultiuserfield.transform(fullName).asList] Important! Transform function also works with smart fields, and could transform the fields / values referenced from another form through the reference (a field) in your current form See an example here: Using transform function with smart fields | ||||||||||||
add(number) CORE CLOUD | Adds a numeric value to a field (can substract as well, if a negative number is given) [entry.somedatefield.timestamp.add(86400000)] to add 1 day to the date (value of 86400000 is in milliseconds) [entry.somedatefield.timestamp.add(-86400000)] to add -1 day (substract a day) to the date (value of 86400000 is in milliseconds ) Supports dynamic parameters via [entry.field_name] | ||||||||||||
subtruct(number) CORE CLOUD | Subtracts value from field value Supports dynamic parameters via [entry.field_name] | ||||||||||||
multiply(number) CORE CLOUD | Multiplies value by given parameter value [entry.somedatefield.multiply(2)] Supports dynamic parameters via [entry.field_name] | ||||||||||||
divide(number) CORE CLOUD | Divides value by given parameter value [entry.somedatefield.divide(2)] Supports dynamic parameters via [entry.field_name] | ||||||||||||
split(separator) separator could be a space, like: split( ) CLOUD | Split is an intermediate function to help you with transforming the string values into the arrays of strings, which then can be used with "array type" virtual functions For example: We have a field type called "mytextfield" and want it's content to be passed to JIRA as labels. For this we need to make sure we split the entered text by "space" and then use a corresponding virtual function to transform the object inti the desired representation mytextfield.split( ).asArrayMultiSelect Any other "array type" function can be applied. For example to get the count, one will write the following mytextfield.split( ).asCount | ||||||||||||
hasChanged(fieldName) FROM V. 1.36 FROM V. 1.50.1 - can be used in Field Definition Rules as well! FROM V. 1.51.6 - you can use it without specifying property to track ANY field change. By using hasChanged():true | Now you can easily understand if the field value has been changed or not. Can be used Example in IFTTT macro: The result of the function is a boolean, "true" is returned when the value for the field is different from current, and "false" is returned otherwise Example: hasChanged(somefield):true or hasChanged(somefield):true AND hasChanged(anotherfield):false In addition to "hasChanged" function, ConfiForms has a support to get "previous state" of the record. And that is using a "virtual property" called: "_previousState" Below example has the same result as "hasChanged(somefield):true" !somefield:[entry._previousState.somefield] This expression could be also used with IFTTT macro condition to determine if the value has been changed, but also allows you to create a more sophisticated filters like the one below: hasChanged(mynum):true AND mynum:<[entry._previousState.mynum] Checks if the value has been changed and if the previous value was bigger than current This is available only in IFTTT and this also means that the synthetic property _previousState is available for you to us ein filters For example - we want to run another IFTTT when the record status has changed from one value to another (when "MyStatus" status field has changed it's value and the value was changed from "requested" to "development") hasChanged(MyStatus):true AND MyStatus:development AND _previousState.MyStatus:requested | ||||||||||||
asUserLink asUserLinks (same as above, but works on user multiselect fields) FROM V. 1.36.3 Also, there is a function which renders it as a macro: useful for usage withing a template or LIstView/CalendarView asUserLinkMacro | Generates a macro <ac:link><ri:user ri:userkey="USER_KEY_HERE"></ac:link> and renders the HTML out of it USER_KEY_HERE is looked up by function based on the username given | entry.myfield.asUserLink | [entry.myfield.asUserLink] on multi-select user fields use [ entry.myfield.asUserLinks ] | ||||||||||
asLink FROM V. 1.37.1 CLOUD asLinks FROM V. 1.38 CLOUD asLink(Some label) asLink([entry.somefield]) FROM V. 1.44 CLOUD | Returns value as HTML link (<a href="VALUE">VALUE</a>) Also, for collections: function "asLinks" | entry.myfield.asLink entry.myfield.asLink(I am a link label) | [ entry.myfield.asLink ] [ entry.myfield.asLink(I am a label) ] | ||||||||||
acLink CORE acLinkMacro CORE CLOUD | Renders a link to local resource acLinkMacro functions generates a macro only (without rendering to HTML) <ac:link><ri:page ri:content-title="SPACEKEy:PAGE_TITLE"/></ac:link> | ||||||||||||
parseDate(FORMAT) FROM V. 1.36.6 CLOUD | Tries to format date fields in the specified format, expects date format as in http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html Example on how to parse and format a date from JIRA issue jirakey.fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).formatDate(yyyy-MM-dd) In this example we have a field called "jirakey" in ConfiForms Form, and access a property "created" from JIRA issue. Then we parse the created date, using the format JIRA uses when returning the date/time field via REST API and then we format the date using another virtual function called "formatDate" to show it as year-month-day only | entry.myfield.parseDate(JAVA_FORMAT) | [entry.myfield.parseDate(JAVA_FORMAT)] Returns a timestamp, which you can transform to date using formatDate function or use as a filtering criteria | ||||||||||
toPersianDate CORE | Converts timestamp to Iranian/Persian date date.toPersianDate | date.toPersianDate | [date.toPersianDate] | ||||||||||
toPersianDateTime CORE | Converts timestamp to Iranian/Persian date with time mydatefield.toPersianDateTime | date.toPersianDateTime | [date.toPersianDateTime] | ||||||||||
join FROM V. 1.38 CLOUD | You can join the field values into one string. Works best on multi-select fields For example (expect a field to be a multi-select field here): id:[entry.mymultifield.transform(id).join( OR id:)] Will extract the ID's from a record stored, and then join (concatenate) those ID's into one string, separated by OR id: Something like this (when mymultifield contains 2 items): id:1234-5678-9000-1234-5678-9000 OR id:1234-5678-9000-1234-5678-9001 | entry.myfield..join(SOME VALUE) | [[entry,myfield.join(, Hello: )] | ||||||||||
asJIRAIssue FROM V. 1.40 CLOUD | Helps you to transform the values of a "JIRA Issues multi-select" field into a JIRA objects to allow access to any property/field of the JIRA issue | entry.myfield.asJIRAIssue.key entry.myfield.asJIRAIssue.fields.customfield_x | Any property from JIRA issue, See Accessing field values and properties for JIRA field type | ||||||||||
asInsightObject FROM V. 1.49.1 | Helps you to transform the values of a "Insight Objects multi-select" field into a list of Insight Objects, which can be then transformed via "transform" function or properties can be accesssed directy | ||||||||||||
asPage FROM V. 1.40 CLOUD | Helps you to transform the values saved to Page objects when used on Page/BlogPosts multi-select field Or to try to transform numeric value to page object (load page by id) | entry.myfield.asPage.spaceKey | Any property from a Page object, see Accessing field values and properties | ||||||||||
userInSecurityGroup securityGroupHas FROM V. 1.40 | Both functions allow you to check if a particular user belongs to a given security group or not Examples: If field "u" is holding a username and we want to check if this user belongs to "confluence-administrators" group u.userInSecurityGroup(confluence-administrators) If field "sg" holds a name of a security group and we want top check if a username is in this security group sg.securityGroupHas(sash) In the example below we check the same, but for currently logged in user sg.securityGroupHas() Both functions return "true" when condition is matched and "false" otherwise (without quotes) This means that if you need to put a filter to check the condition, the full expression will look like: u.userInSecurityGroup(confluence-administrators):true or sg.securityGroupHas():true | ||||||||||||
get(index) FROM V. 1.42.4 CLOUD Using get() without an index will return the last item from the list FROM V. 1.44.2 CLOUD | Get's the element by index form a multi-value field To get the first element (index starts from 0) somefield.get(0) Another example with chaining the functions (when somefield holds a string value and we split it by "," and get the first element) somefield.split(,).get(0) | ||||||||||||
append FROM V. 1.43 CLOUD | Appends text to a value Will append a space to the value of "somefield" somefield.append( ) For multi-select dropdown, adding space after transformation and shows in as html link somefield.transform(label.append()).asLinks Argument can be dynamic, and reference another field, like [entry.somefield], so you can concat values together | ||||||||||||
prepend FROM V. 1.45.2 CLOUD | Prepends text to a value Will append a space to the value of "somefield" somefield.prepend(SOME TEXT HERE) Argument can be dynamic, and reference another field, like [entry.somefield], so you can concat values together | ||||||||||||
lowerCase FROM V. 1.44.2 CLOUD | Returns a lowercases value for the field | ||||||||||||
upperCase FROM V. 1.44.2 CLOUD | Returns a uppercased value for the field | ||||||||||||
formatLinks FROM V. 1.45.2 CLOUD | Tries to format the http(s) links found in the text as HTML links somefield.formatLinks | ||||||||||||
greenhopperAsJSON FROM V. 1.45.3 CLOUD | Tries to parse the fiedl value returned by JIRA API for greenhopper fields com.atlassian.greenhopper.service.sprint.Sprint@71f1f2ae[id=6745,rapidViewId=2391,state=ACTIVE,name=My Sprint 2,startDate=2017-08-29T10:46:33.923+01:00,endDate=2017-09-08T10:46:00.000+01:00,completeDate=<null>,sequence=6745] to a structure you can access via properties id=6745 rapidViewId=2391 state=ACTIVE name=My Sprint 2 startDate=2017-08-29T10:46:33.923+01:00 endDate=2017-09-08T10:46:00.000+01:00 completeDate= sequence=6745 Example (to return a sprint name) myJIRAField.fields.customfield_10900.greenhopperAsJSON.name | ||||||||||||
asIFTTTRef(RESULT_NAME_AND_MORE) FROM V. 1.47.2 CLOUD | The idea and the need for this function is the same as described for function asEntryRef(REF_TO_ENTRY) This allows you to "escape" the ${IftttResult_NAME.someproperty} into a function to workaround template evaluations against the current record. Useful when your ConfiForms Form creates a page with another ConfiFormiForms Form and that form has various rules using iftttResults or entry.fieldnames entry.id.asIFTTTRef(MYRESULT.id) will produce ${iftttResult_MYRESULT.id} entry.id.asIFTTTRef(MYRESULT) will produce ${iftttResult_MYRESULT} | ||||||||||||
asUserProfileLink FROM V. 1.48 | Outputs a field value as a link to user profile (with avatar and full name). The field must have a username as a value [entry.myfieldholdingusername.asUserProfileLink] | ||||||||||||
replaceAccents replaceAccents() FROM V. 1.48.2 CLOUD | Replaces the following accents letters using the folllwing mapping "Ä" -> "Ae" "Æ" -> "Ae" "ä" -> "ae" "æ" -> "ae" "Ö" -> "Oe" "ö" -> "oe" "Ü" -> "Ue" "ü" -> "ue" "ß" -> "ss" "ó" -> "o" "ú" -> "u" "Ç" -> "C" "ç" -> "c" "í" -> "i" "Ñ" -> "N" "ñ" -> "n" "À" -> "A" "Â" -> "A" "à" -> "a" "â" -> "a" "È" -> "E" "É" -> "E" "Ê" -> "E" "è" -> "e" "é" -> "e" "ê" -> "e" [entry.myfield.replaceAccents] | ||||||||||||
replaceWith(searchstring, replacewith) FROM V. 1.48.2 CLOUD | Replaces every value matching "search string" in a field with given "replace with" value [entry.myfield.replaceWith(hi,hola)] Will match every "hi" and replace it with "hola" | ||||||||||||
formatLink(url ) formatLink(url|label ) FROM V. 1.51.3 CLOUD | Helps you to create http links from values in ConfiForms directly in teh views [entry.myfield.formatLink(https://google.com?q=)] will create a <a href="https://google.com?q=<VALUE_OF_MY_FIELD>" target="_blank"><VALUE_OF_MY_FIELD></a> the below example shows how to specify a contant label for your links [entry.myfield.formatLink(https://google.com?q=|search)] will create a <a href="https://google.com?q=<VALUE_OF_MY_FIELD>" target="_blank">search</a> | ||||||||||||
timestamp FROM V. 1.52.1 CLOUD | Tries to get the timestamp from date/datetime/timestamp holding fields in epoch format | ||||||||||||
asHex FROM V. 1.52.1 CLOUD | Converts string into hex representation
You can use it with other functions, as usual... something like [entry.myfield.asHex.upperCase] | ||||||||||||
dec2Hex FROM V. 1.52.1 CLOUD | Converts decimals to hex
As always, you can chain the functions [entry.myfield.dec2Hex.upperCase] [entry.myfield.dec2Hex.trim(4)] - returns last 4 digits, instead of 000000D2 for 210 will return 00D2 | ||||||||||||
randomInt(minVal) FROM V. 2.0.8 | You can generate tips from ConfiForms data with something like <ac:macro ac:name="confiform-plain"> <ac:parameter ac:name="filter">valuecounter:[entry._total.randomInt(1)]</ac:parameter> <ac:parameter ac:name="formName">f</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:plain-text-body><![CDATA[[entry.advice]]]></ac:plain-text-body> </ac:macro> To show "random" advice from your form of "advices" Where "valuecounter" field is autonumber field and we randomly picking one record from a dataset, starting from 1 (that is why we use "randomInt(1)" function on _total field) | ||||||||||||
toString CORE | Ensures the value is a string value | ||||||||||||
timezoneAwareDate CORE | Tries to format the date given in the user's timezone. Uses user's defined formatting pattern to format the date | ||||||||||||
timezoneAwareDateTime CORE | Tries to format the date/time given in the user's timezone. Uses user's defined formatting pattern to format the datetime | ||||||||||||
formatNumberWithLocale(COUNTRY) CORE | Formats number with a given locale formatNumberWithLocale(de) will format the number in German locale. See supported locales in Java 8, https://www.oracle.com/technetwork/java/javase/java8locales-2095355.html | ||||||||||||
compactDateTimeInterval FROM V. 2.0.23 | Helper function to render DateTime Interval field values in a more compact way when the date for start and end is within the same day [entry.mydatetimeintervalfield.compactDateTimeInterval] Example (the output format is specific to your Confluence date/time formatting settings):
| ||||||||||||
truncWithExpand(N) where N is the number of characters to show FROM V. 2.0.25 CLOUD | [entry.field_name.truncWithExpand(10)] will show the first 10 symbols and if the value is longer then the "..." block will be shown to allow your users to expand the value | ||||||||||||
extractText CORE CLOUD | Extracts text from HTML value | ||||||||||||
renderAsText CORE CLOUD | Render as Text (mainly to be used with values produced by wiki markdown field type) | ||||||||||||
renderAsHtml CORE CLOUD | Render as HTML (mainly to be used with values produced by wiki markdown field type) | ||||||||||||
renderWikiMarkup FROM V. 2.1.0 | Renders wiki markup contents as html | ||||||||||||
removeCRLFs FROM V. 2.1.0 CLOUD | Removes all new lines in a field value | ||||||||||||
removeSpaces FROM V. 2.1.0 CLOUD | Removes all the spaces in the field value | ||||||||||||
remove(value) CORE CLOUD | Removes value from the field (works as replaceWith for non-collections (single fields) and as remove item for multi-value fields) | ||||||||||||
obscure FROM V. 2.6.0 CLOUD | Hides the value behind the given mask pwd.obscure(********|click to view) Will create something like Clicking on the "click to view" link will reveal the actual value of the "pwd" field | ||||||||||||
hasValue(value) FROM V. 2.9.4 CLOUD | Helps you to determine if the field has certain value. Useful when you want to check if the multi-select field has a certain option selected field.hasValue(somevalue) For single choice fields it checks for equality Can be used with Supported math operators, formulas and functions to construct conditional formulas For example: IF([entry.Options.hasValue(choice1)], 10, 0) | ||||||||||||
escapeSQL FROM V. 2.9.5 CLOUD | Escapes SQL parameters | ||||||||||||
getOptions FROM V. 2.9.5 | Allows you to get all the options registered with a field (choice based field, like radio group, checkbox group, dropdowns...) For example, to get the labels for options registered in a field called "radiogroup" id.getOptions(radiogroup).transform(label) | ||||||||||||
getUnselectedOptions FROM V. 2.9.5 | Allows you to get all the UNSELECTED options registered with a field (choice based field, like radio group, checkbox group, dropdowns... To get unselected options from a field called "radiogroup" and show them on each line separately id.getUnselectedOptions(radiogroup).transform(label.append(<br/>)) | ||||||||||||
queryAndRender(<formName:pageId>;<FILTER>;<FIELDS>;<VIEW_TYPE>) FROM V. 2.10 | You can add a ConfiForms Field to your form's view and set it to show the contents of another form within your form
Example id.queryAndRender(f:819201;*;t;table) this renders a TableView inside the field for form "f" located on page "819201", showing all the records from this form and only "t" field. id.queryAndRender(myform:819202;partner:[entry.partner];name|amount;card) this renders a CardView inside the field for form "myform" located on page "819202", showing records matching the value in "partner" field and showing 2 fields: "name" and "amount". | ||||||||||||
pageProperties(property_name) FROM V. 2.10.7 CLOUD | Access page properties of a page object. The field you can apply this function has to be a page or should resolve into a page (page ID) mypage.pageProperties(property_name) What is page properties: https://confluence.atlassian.com/doc/page-properties-macro-184550024.html | ||||||||||||
sort(property_name ASC) sort(property_name1 ASC, property_name2 DESC) FROM V. 2.11.3 | Sorts lists of choices / objects | ||||||||||||
asUserTimezone FROM V. 2.12.4 | Represents given date as in user timezone date. Actually al the dates in ConfiForms are stored/entered in server timezone! But sometimes it is required to pass the selected date further (to Jira, for example) as if it is given in user timezone. | someDate.asUserTimezone.jiraDateTime | [someDate.asUserTimezone.formatDate] | ||||||||||
asUserTimezoneAwareDate asUserTimezoneAwareDateTime FROM V. 2.12.4 | Aliases for timezoneAwareDate and timezoneAwareDateTime | Formats dates in user timezones someDate.asUserTimezoneAwareDate someDate.asUserTimezoneAwareDateTime | |||||||||||
timezoneOffset FROM V. 2.13.2 | Returns offset between server and user's timezones in milliseconds | ||||||||||||
htmlToWiki FROM V. 2.13.2 | Attempts to convert an HTML to Atlassian wiki markup (please note that this is an experimental function and does not support nested inline CSS styles) |
If entry value is null or could not be formatted according to rules then value is returned as-is
See also Accessing field values and properties. You can use complex properties in your filters. For example filtering dropdown fields by values and by labels, filtering page type fields by page metadata fields, filtering user fields by, for example - email property