Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

See if the function is available for ConfiForms CLOUD

Status
colourBlue
titleCLOUD

Warning

Important! Function names and field names are CASE SENSITIVE. It is very important to follow the correct letter casing as per documentation


In order to make it easier to integrate with other external systems, such as JIRA, for example, or transform values as you like and need we have implemented so called "virtual" functions, what you can call on field values. 


Usage:

  • When using in IFTTT macro body or in ListView/PlainView/CalendarView - the notation would be: [entry.fieldname.virtual_function] 

 

  • When using in ConfiForms Field macro then reference it by fieldname, adding the virtual function name: fieldname.virtual_function
  • Please note that accessing values via [entry.field_name] notations brings you internal values.. which means you will need to make sure they are what you need - formatting dates via formatDate, accessing .label properties for choice-based fields and things like that.
  • When using in ConfiForms Field macro then reference it by a field name, adding the virtual function name: fieldname.virtual_function

...


Useful, when you try to prepare a JSON or some other format when used together with IFTTT macro to enable integrations with other systems 


Info

Functions support chaining ! That means you can apply function on a result of the previous function as much as you like

Info

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:

Status

...

colourGreen
titleCORE
- means the function is available since ConfiForms version 1.x 


FunctionDescriptionUsing
DescriptionUsing
in ConfiForms Field macroUsing in ListVIew/PlanView/CalendarView or in IFTTT macro body

urlencode

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD
         

Does URL encode on given value, see "urlEncode" method in

https://

developer

docs.atlassian.com/

static

ConfluenceServer/javadoc/

confluence/4

7.16.0

/reference

/com/atlassian/confluence/util/GeneralUtil.html

myfield.urlencode[entry.myfield.urlencode]
escapeXML
Escapes XML

urldecode

Status
colourBlue
titleCLOUD

Status
colourGreen
title3.7.6

Does URL decode on given value, see "

escapeXml

urlDecode" method in

https://

developer

docs.atlassian.com/

static

ConfluenceServer/javadoc/

confluence/4

7.16.0/

reference/

com/atlassian/confluence/util/GeneralUtil.html

myfield.
escapeXml
urldecode[entry.myfield.
escapeXml
urldecode]
escape
Escapes string as in "escapeForHtmlAttribute

escapeXML

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD

Escapes XML on given value, see "escapeXml" method in

https://

developer

docs.atlassian.com/

static

ConfluenceServer/javadoc/

confluence/4

7.16.0/

reference/

com/atlassian/confluence/util/GeneralUtil.html

myfield.
escapeForHtmlAttribute
escapeXml[entry.myfield.
escapeForHtmlAttribute]
formatDate
escapeXml]

escape

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD
         

Escapes string as in "escapeForHtmlAttribute" method in

https

Tries to format date fields in the specified format, expects date format as in http

://docs.

oracle

atlassian.com/ConfluenceServer/

javase

javadoc/7.16.0/

docs

com/

api

atlassian/

java

confluence/

text

util/

SimpleDateFormat

GeneralUtil.html

myfield.
formatDate(JAVA_FORMAT)
escapeForHtmlAttribute[entry. myfield.
formatDate(JAVA_FORMAT)
escapeForHtmlAttribute]

escapeJavaScript

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD
         

Escapes JavaScript from the value

formatDate

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD


Status
colourGreen
titlefrom v. 2.12.5

You can specify date format and timezone. When you dont specify the timezone a user's timezone is used to format the date/time value

Example:

formatDate(MM-dd-yyyy, UTC)

Supported timezone arguments

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)

convertDate(FORMAT, TIMEZONE)

Status
colourGreen
titlefrom v. 2.13.5

Status
colourBlue
titleCLOUD

Supported timezone arguments

This function converts a timestamp (UTC) into the formatted date in a specified timezone

Format can be anything supported by  http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Timezone argument can be anything documented here: Supported timezone arguments


Example:

myfield.convertDate(yyyy-MM-dd'T'HH:mm:ss.SSS'Z', Europe/Tallinn)


jiraDate

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD
         

Status
colourGreen
titlefrom v. 2.12.5

You can specify date a timezone

jiraDate(America/Chicago)

Supported timezone arguments

Same as "formatDate" method above, but specifies constant DateFormat pattern (yyyy-MM-dd), suitable for JIRA REST APImyfield. jiraDate[entry.myfield. jiraDate]

jiraDateTime

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD
         

]

(no quotes)

jiraDate
Same as "formatDate" method above, but specifies constant dateformat pattern (yyyy-MM-dd), suitable for JIRA REST APImyfield.jiraDate[entry.myfield.jiraDate]
jiraDateTime
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 fieldsmyfield.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 escapedmyfield.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

No Format
"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

https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue#JIRARESTAPIExample-CreateIssue-MultiSelect

  • asArrayMultiSelect
  • asArrayMultiUserPicker (can be used to generate arrays for both: multi-user and multi-group field types)

 

ConfiForms (FormView) Registrations Control
pageTitleConfiForms Backlog
formNameconfiFormsIssues
registrationMessageThank you for your request. We will contact your shortly
registrationButtonLabelLet us know if something you want to use is missing

 

myfield.asArray

myfield.asArrayMultiSelect

myfield.asArrayMultiUserPicker

[entry.myfield.asArray]

[entry.myfield.asArrayMultiSelect]

 [entry.myfield.asArrayMultiUserPicker]

asArray(separator)

Status
colourGreen
titlefrom v.

1.35

2.12.5

You can specify date a timezone

jiraDateTime(UTC)

Supported timezone arguments

Same as "
asArray" without a parameter, but allows you to set own separator

Example:

Code Block
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_
formatDate " method above, but specifies constant dateformat pattern ("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"), should be compatible with ISO 8601 standard as JIRA requires when setting timestamps to JIRA fields myfield. jiraDateTime
myfield.asArray(separator)
[entry.myfield.
asArray(separator)
jiraDateTime]
asArrayOfIds

Same as the above, but exporting IDs of the multi-select values in the following format:

Code Block
"1", "2"

escapeJSON

Status
colourGreen
titleCORE

Status
colourBlue
titleCLOUD

Escapes illegal characters in the field value to generate a valid JSON property. New lines, quotes, tabs and etc will be properly escaped

No Format
[entry.myfield.escapeJSON]
myfield. escapeJSON
myfield.asArrayOfIds
[entry.myfield.
asArrayOfIds
escapeJSON ]
asArrayOfKVPairs(key)

asArray

asArrayMultiSelect

asArrayMultiUserPicker

Status
colourGreen
title

from v. 1.35

Will output the list of values in a format:

Code Block
{"key":"value"}, {"key2": "value2"}

Useful for adding JIRA labels, like when giving a key as "add"

Code Block
{"add": "value"}, {"add", "value2"}
  
replaceCRLFWithBR
Replaces CR/LF with <BR/> to show with line brakes in HTML (useful when you reference the textarea field using [entry.] notation)myfield.replaceCRLFWithBR[entry.myfield.replaceCRLFWithBR]
asUserFullNames
Works only with User multi-select fields and shows list of full names for selected usersmyfield.asUserFullNames[entry.myfield.asUserFullNames]
asUserEmails
Works only with User multi-select fields and shows list of emails for selected usersmyfield.asUserEmails[entry.myfield.asUserEmails]
asUserNames
Works only with User multi-select fields and shows list of usernames for selected usersmyfield.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.htmlmyfield.friendlyDate[entry.myfield.friendlyDate]
asCount
Returns size of a collection for multi-value fields or number of chars for other typesmyfield.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 typesmyfield.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

Info

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(name:Alex) - to show only persons selected with name Alex only (here "name" references a field in 2nd form)
  • entry.mf.asFilteredBy(surname:Ve*) - to show only persons selected with surnames starting with "Ve" only (here "surname" references a field in 2nd form)
  • entry.mf.asFilteredBy(position:CEO) - to filter OUT all those selected who are NOT in CEO position
entry.mf.asFilteredBy(FILTER)

Filter should be in a format:

property:filter

[entry.mf.asFilteredBy(name:Alex)]

The following filters are supported:

  • value*
  • *value
  • *value*
  • *
  • [empty]

     

    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 valueentry.myfield.camelCase[entry.myfield.camelCase]
    camelCaseAndTrim
    Makes a CamelCase string from a given value and, additionally, removes all the spacesentry.myfield.camelCaseAndTrim[entry.myfield.camelCaseAndTrim]addCRLFAdds CR and LF characters after the valueentry.addCRLF[entry.addCRLF]addCRLFHtmlAdds <br/> (brake) after the value in HTML formatentry.addCRLFHtml[entry.addCRLFHtml]trunc(NUMBER)Truncates the value. Leaves "n" first symbolsentry.trunc(100)[entry.trunc(100)]trim(NUMBER)Trims the value, Skips "n" first symbolsentry.trim(10)[entry.trim(10)]

    asAttachment

    asAttachment(n)

    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

    Code Block
    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

    Returns bas64 encoded string of the file contents in this attachmententry.asAttachment.base64

    [entry.asAttachment.base64]

    [entry.asAttachment(0).base64]

    [entry.asAttachment(1).base64]

    asAttachment.ANY_PROPERTY

    asAttachment(n).ANY_PROPERTY

     

    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:

    Code Block
    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
      

    asUser.username

    asUser.fullName

    asUser.email

    asUser(n).username

    asUser(n).fullName

    asUser(n).email

     When working with multi-select user control/field and want to get a particular user info

    Warning

    Only works with Multi-select user field!

      asEntryRef(REF_TO_ENTRY)

    Example:

    Code Block
    [entry.id.asEntryRef(entry.id)]

    This will return

    Code Block
    [entry.id]

    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

    Code Block
    [entry.id.asEntryRef(entry.somefield)] will return [entry.somefield]
    [entry.id.asEntryRef(entry.mytextfield)] will return [entry.mytextfield]
    [entry.id.asEntryRef(entry.anotherfield)] will return [entry.anotherfield]
    [entry.id.asEntryRef(entry.id)] will return [entry.id]

     

    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:

    Code Block
    [PARAM]

     

     

      asJSONConverts a value to JSON and allows to access JSON object properties

    entry.myfield.asJSON.someJSONProperty

    entry.myfield.asJSON.anotherJSONProperty

     
    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:

    • phone
    • im
    • website
    • position
    • department
    • location

    entry.somefield.asUserProfile.phone

    entry.somefield.asUserProfile.im

    entry.somefield.asUserProfile.website

    entry.somefield.asUserProfile.position

    entry.somefield.asUserProfile.department

    entry.somefield.asUserProfile.location

     

    Info

    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]

    asListExtracts values of a list and converts to a comma-separated string, see below for examples on transform and asList  asAttachments

    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)

    Converts the list of some objects into the list of values for the given property

    For example:

    Code Block
    [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

    Code Block
    [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

    Code Block
    [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

    Code Block
    [entry.mymultifield.transform(id)]

    To get the list of dropdown labels

    Code Block
    [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

    Code Block
    [entry.mymultiuserfield.transform(fullName)]

    same as above, but in "coma-separated" string

    Code Block
    [entry.mymultiuserfield.transform(fullName).asList]
    Warning

    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)

    Adds a numeric value to a field (can substract as well, if a negative number is given)

    Code Block
    [entry.somedatefield.timestamp.add(86400000)]

    to add 1 day to the date (value of 86400000 is in milliseconds)

    Code Block
    [entry.somedatefield.timestamp.add(-86400000)]

    to add -1 day (substract a day) to the date (value of 86400000 is in milliseconds)

     

      

    split(separator)

    Info

    separator could be a space, like:

    Code Block
    split( )

    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

    Code Block
    mytextfield.split( ).asArrayMultiSelect

    Any other "array type" function can be applied. For example to get the count, one will write the following

    Code Block
    mytextfield.split( ).asCount
      

    hasChanged(fieldName)

    Status
    colourGreen
    titlefrom v. 1.36

    Now you can easily understand if the field value has been changed or not. Can be used ONLY in IFTTT macro, in "condition" parameter. Only in this case, we have a previous snapshot of the data for this record. And the function is applied on the whole entry and not on the field.

    Example in IFTTT macro:

    Image Removed

    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:

    Code Block
    hasChanged(somefield):true

    or

    Code Block
    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"

    Code Block
    !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:

    Code Block
    hasChanged(mynum):true AND mynum:<[entry._previousState.mynum]

    Checks if the value has been changed and if the previous value was bigger than current

      

    asUserLink

    asUserLinks (same as above, but works on user multiselect fields)

    Status
    colourGreen
    titlefrom v. 1.36.3

    Generates a macro

    Code Block
    <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]

     

    CORE

    Status
    colourBlue
    titleCLOUD
             


    Tries to create an array from the value. Useful when you want to pass ConfiForms multi-select values to JIRA. Something like

    No Format
    "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

    https://developer.atlassian.com/jiradev/jira-apis/about-the-jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue

    • asArrayMultiSelect
    • asArrayMultiUserPicker (can be used to generate arrays for both: multi-user and multi-group field types)


    ConfiForms (FormView) Registrations Control
    pageTitleConfiForms Backlog
    formNameconfiFormsIssues
    registrationMessageThank you for your request. We will contact your shortly
    registrationButtonLabelLet us know if something you want to use is missing


    myfield.asArray

    myfield.asArrayMultiSelect

    myfield.asArrayMultiUserPicker

    [entry.myfield.asArray]

    [entry. myfield.asArrayMultiSelect]

     [entry. myfield.asArrayMultiUserPicker]

    asArray(separator)

    Status
    colourGreen
    titlefrom v. 1.35

    Status
    colourBlue
    titleCLOUD

    Same as "asArray" without a parameter, but allows you to set own separator

    Example:

    Code Block
    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Same as the above, but exporting IDs of the multi-select values in the following format:

    Code Block
    "1", "2"
    myfield.asArrayOfIds [entry.myfield.asArrayOfIds]

    asArrayOfKVPairs(key)

    Status
    colourGreen
    titlefrom v. 1.35

    Status
    colourBlue
    titleCLOUD

    Will output the list of values in a format:

    Code Block
    {"key":"value"}, {"key": "value2"}

    Useful for adding JIRA labels, like when giving a key as "add" → asArrayOfKVPairs(add)

    Code Block
    {"add": "value"}, {"add", "value2"}

    [entry.asArrayOfKVPairs(key)] will produce something like {"key":"value"}, {"key": "value2"}

    replaceCRLFWithBR

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Does the opposite to "replaceCRLFWithBR" and replaces <br/> tags with CRLF

    asUserFullNames

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Works only with User multi-select fields and shows list of full names for selected usersmyfield. asUserFullNames[entry.myfield.asUserFullNames]

    asUserEmails

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Works only with User multi-select fields and shows list of emails for selected users myfield. asUserEmails[entry.myfield.asUserEmails]

    asUserNames

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Works only with User multi-select fields and shows list of usernames for selected usersmyfield.asUserNames[entry.myfield.asUserNames]

    friendlyDate

    Status
    colourGreen
    titleCORE

    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Returns size of a collection for multi-value fields or number of chars for other typesmyfield.asCount[entry. myfield.asCount]

    asSize

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Returns size of a collection for multi-value fields or number of chars for other typesmyfield.asLength[entry. myfield.asLength]

    formatCurrency

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    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

    Info

    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    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)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
     

    Since        

    Status
    colourGreen
    title3.0.0
    supports ConfiForms Filters expression when applied on a smart field

    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(name:Alex) - to show only persons selected with name Alex only (here "name" references a field in 2nd form)
    • entry.mf.asFilteredBy(surname:Ve*) - to show only persons selected with surnames starting with "Ve" only (here "surname" references a field in 2nd form)
    • entry.mf.asFilteredBy(position:CEO) - to filter OUT all those selected who are NOT in CEO position
    entry.mf.asFilteredBy(FILTER)

    Filter should be in a format:

    property:filter

    [entry.mf.asFilteredBy(name:Alex)]

    The following filters are supported:

    • value*
    • *value
    • *value*
    • *
    •             [empty]
                
                  
                    


    trimAllSpaces

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Makes a CamelCase string from a given valueentry.myfield. camelCase[entry.myfield. camelCase]

    camelCaseAndTrim

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD
             

    Makes a CamelCase string from a given value and, additionally, removes all the spacesentry.myfield. camelCaseAndTrim[entry.myfield. camelCaseAndTrim]

    addCRLF

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Adds CR and LF characters after the valueentry.addCRLF[entry.addCRLF]

    addCRLFHtml

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Adds <br/> (brake) after the value in HTML formatentry.addCRLFHtml[entry.addCRLFHtml]

    trunc(NUMBER)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    truncLeft(NUMBER)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    truncRight(NUMBER)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Truncates the value. Leaves "n" first symbolsentry.trunc(100)[entry.trunc(100)]

    trim(NUMBER)

    trim() - will trim the value from leading/trailing spaces

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    trimLeft(NUMBER)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Trims the value, Skips "n" first symbolsentry.trim(10)[entry.trim(10)]

    trimRight(NUMBER)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Trims the value, Removes "n" last symbols

    asAttachment

    asAttachment(n)

    Status
    colourGreen
    titleCORE

    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

    Code Block
    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

    Status
    colourGreen
    titleCORE


    Returns bas64 encoded string of the file contents in this attachment

    ConfiForms uses https://commons.apache.org/proper/commons-codec/apidocs/org/apache/commons/codec/binary/Base64.html#encodeBase64URLSafeString-byte:A- to do this and it is important to note that

    Info

    Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the output. The url-safe variation emits - and _ instead of + and / characters.   Note: no padding is added.

    Status
    colourGreen
    titlefrom v. 2.24.7
    base64 function supports true/false as parameters to generate base64 with or without padding


    base64(true) - generates URL-safe output (same as without parameter)

    base64(false) - generates pure base64 hash

    entry.asAttachment.base64

    [entry.asAttachment.base64]

    [entry.asAttachment(0).base64]

    [entry.asAttachment(1).base64]

    asAttachment.ANY_PROPERTY

    asAttachment(n).ANY_PROPERTY

    Status
    colourGreen
    titleCORE


    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:

    Code Block
    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


    base64Decode

    Status
    colourGreen
    titlefrom v. 3.10.4

    Status
    colourBlue
    titleCLOUD

    Decodes a base64 string into original text value



    asUsers

    Status
    colourGreen
    titlefrom 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:

    Code Block
    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

    Status
    colourGreen
    titleCORE

     When working with multi-select user control/field and want to get a particular user info

    Warning

    Only works with Multi-select user field!



    asEntryRef(REF_TO_ENTRY)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Example:

    Code Block
    [entry.id.asEntryRef(entry.id)]

    This will return

    Code Block
    [entry.id]

    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

    Code Block
    [entry.id.asEntryRef(entry.somefield)] will return [entry.somefield]
    [entry.id.asEntryRef(entry.mytextfield)] will return [entry.mytextfield]
    [entry.id.asEntryRef(entry.anotherfield)] will return [entry.anotherfield]
    [entry.id.asEntryRef(entry.id)] will return [entry.id]


    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:

    Code Block
    [PARAM]


    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

    Code Block
    [entry._func.asEntryRef(entry.somefield)] will return [entry.somefield]
    [entry._func.asEntryRef(entry.mytextfield)] will return [entry.mytextfield]
    [entry._func.asEntryRef(entry.anotherfield)] will return [entry.anotherfield]
    [entry._func.asEntryRef(entry.id)] will return [entry.id]


    asVelocityExpRef(VALUE)

    Status
    colourGreen
    titlefrom v. 1.50.1

    Status
    colourBlue
    titleCLOUD

    Same as asEntryRef, and asIFTTTRef, but returns a value wrapped in ${}, like ${VALUE}

    asJSON

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Converts a value to JSON and allows to access JSON object properties

    entry.myfield.asJSON.someJSONProperty

    entry.myfield.asJSON.anotherJSONProperty


    asRef(VALUE)

    Status
    colourGreen
    titlefrom v. 1.53.8

    Status
    colourBlue
    titleCLOUD

    Same as asEntryRef, and asIFTTTRef, but returns an exact expression as you have put inside the arguments

    asRef(VALUE) will return VALUE



    asUserProfile

    Status
    colourGreen
    titleCORE

    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:

    • phone
    • im
    • website
    • position
    • department
    • location

    entry.somefield.asUserProfile.phone

    entry.somefield.asUserProfile.im

    entry.somefield.asUserProfile.website

    entry.somefield.asUserProfile.position

    entry.somefield.asUserProfile.department

    entry.somefield.asUserProfile.location


    Info

    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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Extracts values of a list and converts to a comma-separated string, see below for examples on transform and asList

    asAttachments

    Status
    colourGreen
    titleCORE

    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)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Converts the list of some objects into the list of values for the given property

    For example:

    Code Block
    [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

    Code Block
    [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

    Code Block
    [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

    Code Block
    [entry.mymultifield.transform(id)]

    To get the list of dropdown labels

    Code Block
    [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

    Code Block
    [entry.mymultiuserfield.transform(fullName)]

    same as above, but in "coma-separated" string

    Code Block
    [entry.mymultiuserfield.transform(fullName).asList]
    Warning

    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)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Adds a numeric value to a field (can substract as well, if a negative number is given)

    Code Block
    [entry.somedatefield.timestamp.add(86400000)]

    to add 1 day to the date (value of 86400000 is in milliseconds)

    Code Block
    [entry.somedatefield.timestamp.add(-86400000)]

    to add -1 day (substract a day) to the date (value of 86400000 is in milliseconds )

    Info

    Supports dynamic parameters via [entry.field_name]



    subtract(number)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Subtracts value from field value

    Info

    Supports dynamic parameters via [entry.field_name]



    multiply(number)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Multiplies value by given parameter value

    Code Block
    [entry.somedatefield.multiply(2)]
    Info

    Supports dynamic parameters via [entry.field_name]



    divide(number)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Divides value by given parameter value 

    Code Block
    [entry.somedatefield.divide(2)]
    Info

    Supports dynamic parameters via [entry.field_name]



    split(separator)

    Info

    separator could be a space, like:

    Code Block
    split( )

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    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

    Code Block
    mytextfield.split( ).asArrayMultiSelect

    Any other "array type" function can be applied. For example to get the count, one will write the following

    Code Block
    mytextfield.split( ).asCount


    hasChanged(fieldName)

    Status
    colourGreen
    titlefrom v. 1.36

    Status
    colourGreen
    titlefrom v. 1.50.1
    - can be used in Field Definition Rules as well!

    Status
    colourGreen
    titlefrom v. 1.51.6
    - you can use it without specifying property to track ANY field change.

    By using

    Code Block
    hasChanged():true



    Now you can easily understand if the field value has been changed or not. Can be used ONLY (from ConfiForms version 1.50.1 can be used in field definition rules as well!) in IFTTT macro, in "condition" parameter. Only in this case, we have a previous snapshot of the data for this record. And the function is applied on the whole entry and not on the field.

    Example in IFTTT macro:

    Image Added

    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:

    Code Block
    hasChanged(somefield):true

    or

    Code Block
    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"

    Code Block
    !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:

    Code Block
    hasChanged(mynum):true AND mynum:<[entry._previousState.mynum]

    Checks if the value has been changed and if the previous value was bigger than current

    Warning

    This is available only in IFTTT and this also means that the synthetic property _previousState is available for you to use in 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")

    Code Block
    hasChanged(MyStatus):true AND MyStatus:development AND _previousState.MyStatus:requested






    asUserLink

    asUserLinks (same as above, but works on user multiselect fields)

    Status
    colourGreen
    titlefrom 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

    Code Block
    <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

    Status
    colourGreen
    titlefrom v. 1.37.1

    Status
    colourBlue
    titleCLOUD

    asLinks

    Status
    colourGreen
    titlefrom v. 1.38

    Status
    colourBlue
    titleCLOUD

    asLink(Some label)

    asLink([entry.somefield])

    Status
    colourGreen
    titlefrom v. 1.44

    Status
    colourBlue
    titleCLOUD

    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

    Status
    colourGreen
    titleCORE

    acLinkMacro

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Renders a link to local resource

    acLinkMacro functions generates a macro only (without rendering to HTML)

    Code Block
    <ac:link><ri:page ri:content-title="SPACEKEy:PAGE_TITLE"/></ac:link>




    asImageLink

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Renders <img /> link to given url or attachment Id (in cloud)myfield.asImageLink[entry.myfield.asImageLink]

    parseDate(FORMAT)

    Status
    colourGreen
    titlefrom v. 1.36.6

    Status
    colourBlue
    titleCLOUD

    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

    Code Block
    jirakey.fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSS'Z').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

    Status
    colourGreen
    titleCORE

    Converts timestamp to Iranian/Persian date

    Code Block
    date.toPersianDate
    date.toPersianDate[date.toPersianDate]

    toPersianDateTime

    Status
    colourGreen
    titleCORE

    Converts timestamp to Iranian/Persian date with time

    Code Block
    mydatefield.toPersianDateTime
    date.toPersianDateTime[date.toPersianDateTime]

    join

    Status
    colourGreen
    titlefrom v. 1.38

    Status
    colourBlue
    titleCLOUD

    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):

    Code Block
    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):

    Code Block
    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

    Status
    colourGreen
    titlefrom v. 1.40

    Status
    colourBlue
    titleCLOUD

    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

    Status
    colourGreen
    titlefrom 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

    Status
    colourGreen
    titlefrom v. 1.40

    Status
    colourBlue
    titleCLOUD

    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.spaceKeyAny property from a Page object, see Accessing field values and properties

    userInSecurityGroup

    securityGroupHas

    Status
    colourGreen
    titlefrom v. 1.40

    Status
    colourBlue
    titleCLOUD

    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

    Code Block
    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

    Code Block
    sg.securityGroupHas(sash)

    In the example below we check the same, but for currently logged in user

    Code Block
    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:

    Code Block
    u.userInSecurityGroup(confluence-administrators):true

    or

    Code Block
    sg.securityGroupHas():true


    securityGroups

    Status
    colourGreen
    titlefrom v. 2.0

    Status
    colourBlue
    titleCLOUD

    Retrieves user's securityGroups in a comma separated list

    Code Block
    userfield.securityGroups

    (Assuming userfiled is the field holding the username)



    securityGroupUsers

    Status
    colourGreen
    titlefrom v. 2.27.14

    Status
    colourBlue
    titleCLOUD

    on cloud version we return only the first 200 members of a group

    Lists users (comma separated list of user names) for the given security group

    Code Block
    fieldContainingSecurotyGroupName.securityGroupUsers


    get(index)

    Status
    colourGreen
    titlefrom v. 1.42.4

    Status
    colourBlue
    titleCLOUD

    Using get() without an index will return the last item from the list

    Status
    colourGreen
    titlefrom v. 1.44.2

    Status
    colourBlue
    titleCLOUD

    Get's the element by index form a multi-value field

    To get the first element (index starts from 0)

    Code Block
    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)

    Code Block
    somefield.split(,).get(0)


    append

    Status
    colourGreen
    titlefrom v. 1.43

    Status
    colourBlue
    titleCLOUD

    Appends text to a value

    Will append a space to the value of "somefield"

    Code Block
    somefield.append( )

    For multi-select dropdown, adding space after transformation and shows in as html link

    Code Block
    somefield.transform(label.append()).asLinks



    Info

    Argument can be dynamic, and reference another field, like [entry.somefield], so you can concat values together





    prepend

    Status
    colourGreen
    titlefrom v. 1.45.2

    Status
    colourBlue
    titleCLOUD

    Prepends text to a value

    Will append a space to the value of "somefield"

    Code Block
    somefield.prepend(SOME TEXT HERE)
    Info

    Argument can be dynamic, and reference another field, like [entry.somefield], so you can concat values together



    lowerCase

    Status
    colourGreen
    titlefrom v. 1.44.2

    Status
    colourBlue
    titleCLOUD

    Returns a lowercases value for the field

    upperCase

    Status
    colourGreen
    titlefrom v. 1.44.2

    Status
    colourBlue
    titleCLOUD

    Returns a uppercased value for the field

    formatLinks

    Status
    colourGreen
    titlefrom v. 1.45.2

    Status
    colourBlue
    titleCLOUD

    Tries to format the http(s) links found in the text as HTML links

    Code Block
    somefield.formatLinks


    greenhopperAsJSON

    Status
    colourGreen
    titlefrom v. 1.45.3

    Status
    colourBlue
    titleCLOUD

    Tries to parse the fiedl value returned by JIRA API for greenhopper fields

    Code Block
    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

    Code Block
    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)

    Code Block
    myJIRAField.fields.customfield_10900.greenhopperAsJSON.name


    asIFTTTRef(RESULT_NAME_AND_MORE)

    Status
    colourGreen
    titlefrom v. 1.47.2

    Status
    colourBlue
    titleCLOUD

    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


    Code Block
    entry.id.asIFTTTRef(MYRESULT.id) will produce ${iftttResult_MYRESULT.id}
    
    
    entry.id.asIFTTTRef(MYRESULT) will produce ${iftttResult_MYRESULT}


    asUserProfileLink

    Status
    colourGreen
    titlefrom 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

    Code Block
    [entry.myfieldholdingusername.asUserProfileLink]


    replaceAccents

    replaceAccents()

    Status
    colourGreen
    titlefrom v. 1.48.2

    Status
    colourBlue
    titleCLOUD

    Replaces the following accents letters using the folllwing mapping

    Code Block
    "Ä" -> "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"
    Code Block
    [entry.myfield.replaceAccents]


    replaceWith(searchstring, replacewith)

    Status
    colourGreen
    titlefrom v. 1.48.2

    Status
    colourBlue
    titleCLOUD

    Replaces every value matching "search string" in a field with given "replace with" value

    Code Block
    [entry.myfield.replaceWith(hi,hola)]

    Will match every "hi" and replace it with "hola"



    formatLink(url )

    formatLink(url|label )

    Status
    colourGreen
    titlefrom v. 1.51.3

    Status
    colourBlue
    titleCLOUD

    Helps you to create http links from values in ConfiForms directly in teh views

    Code Block
    [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

    Code Block
    [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

    Status
    colourGreen
    titlefrom v. 1.52.1

    Status
    colourBlue
    titleCLOUD

    Tries to get the timestamp from date/datetime/timestamp holding fields in epoch format




    asHex

    Status
    colourGreen
    titlefrom v. 1.52.1

    Status
    colourBlue
    titleCLOUD

    Converts string into hex representation

    stringasHex
    131
    232
    hello68656c6c6f

    You can use it with other functions, as usual... something like

    Code Block
    [entry.myfield.asHex.upperCase]


    dec2Hex

    Status
    colourGreen
    titlefrom v. 1.52.1

    Status
    colourBlue
    titleCLOUD

    Converts decimals to hex

    valuedec2Hex
    100000001
    200000002
    255000000FF
    210000000D2

    As always, you can chain the functions

    Code Block
    [entry.myfield.dec2Hex.upperCase]
    [entry.myfield.dec2Hex.trim(4)] - returns last 4 digits, instead of 000000D2 for 210 will return 00D2


    randomInt(minVal)

    Status
    colourGreen
    titlefrom v. 2.0.8

    Status
    colourBlue
    titleCLOUD

    You can generate tips from ConfiForms data with something like

    Code Block
    <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>[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)



    generateUUID

    Status
    colourGreen
    titlefrom v. 3.4.0

    Status
    colourBlue
    titleCLOUD

    Generates a unique value. Value is based on https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html



    toString

    Status
    colourGreen
    titleCORE

    Ensures the value is a string value

    timezoneAwareDate

    Status
    colourGreen
    titleCORE


    Since 

    Status
    colourGreen
    title2.13.7
     supports setting the formatting pattern

    timezoneAwareDate(PATTERN)

    Status
    colourBlue
    titleCLOUD

    Tries to format the date given in the user's timezone. Uses user's defined formatting pattern to format the date.

    Unless given as parameter ( http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)

    Date is always in the user's timezone



    timezoneAwareDateTime

    Status
    colourGreen
    titleCORE


    Since 

    Status
    colourGreen
    title2.13.7
     supports setting the formatting pattern

    timezoneAwareDateTime(PATTERN)

    Status
    colourBlue
    titleCLOUD

    Tries to format the date/time given in the user's timezone. Uses user's defined formatting pattern to format the datetime.

    Unless given as parameter ( http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)

    Date is always in the user's timezone



    formatNumberWithLocale(COUNTRY)

    Status
    colourGreen
    titleCORE

    Formats number with a given locale

    Code Block
    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

    Status
    colourGreen
    titlefrom 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

    Code Block
    [entry.mydatetimeintervalfield.compactDateTimeInterval]

    Example (the output format is specific to your Confluence date/time formatting settings):

    DateTime Interval valueOutput
    Code Block
    Mar 19, 2019 2:00 PM  - Mar 19, 2019 3:00 PM
    Code Block
    Mar 19, 2019 2:00 PM – 3:00 PM
    Transforms to a short format
    Code Block
    Mar 19, 2019 2:00 PM  - Mar 20, 2019 3:00 PM
    Code Block
    Mar 19, 2019 2:00 PM  - Mar 20, 2019 3:00 PM
    Stays in long format, as event spans 2 days





    truncWithExpand(N) where N is the number of characters to show

    Status
    colourGreen
    titlefrom v. 2.0.25

    Status
    colourBlue
    titleCLOUD

    Code Block
    [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

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Extracts text from HTML value

    renderAsText

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Render as Text (mainly to be used with values produced by wiki markdown field type)

    renderAsHtml

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Render as HTML (mainly to be used with values produced by wiki markdown field type)

    renderWikiMarkup

    Status
    colourGreen
    titlefrom v. 2.1.0

    Renders wiki markup contents as html

    removeCRLFs

    Status
    colourGreen
    titlefrom v. 2.1.0

    Status
    colourBlue
    titleCLOUD

    Removes all new lines in a field value

    removeSpaces

    Status
    colourGreen
    titlefrom v. 2.1.0

    Status
    colourBlue
    titleCLOUD

    Removes all the spaces in the field value

    remove(value)

    Status
    colourGreen
    titleCORE

    Status
    colourBlue
    titleCLOUD

    Removes value from the field (works as replaceWith for non-collections (single fields) and as remove item for multi-value fields)

    If you give a CSV values for multi-select field to remove then it will attempt to remove each value (splitting by ,)



    obscure

    Status
    colourGreen
    titlefrom v. 2.6.0

    Status
    colourBlue
    titleCLOUD

    Hides the value behind the given mask

    Code Block
    pwd.obscure(********|click to view)

    Will create something like

    Image Added

    Clicking on the "click to view" link will reveal the actual value of the "pwd" field



    hasValue(value)

    Status
    colourGreen
    titlefrom v. 2.9.4

    Status
    colourBlue
    titleCLOUD

    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

    Code Block
    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:

    Code Block
    IF([entry.Options.hasValue(choice1)], 10, 0)

    Or in filtering conditions, checking for true or false:

    Code Block
    Options.hasValue(choice1):true

    Of course, chaining with transform is absolutely possible

    Code Block
    Options.transform(label).hasValue(my label):true

    or (assuming Options is a multi-user field)

    Code Block
    Options.transform(fullName).hasValue(John Smith):true


    escapeSQL

    Status
    colourGreen
    titlefrom v. 2.9.5

    Status
    colourBlue
    titleCLOUD

    Escapes SQL parameters

    getOptions

    Status
    colourGreen
    titlefrom v. 2.9.5

    Status
    colourBlue
    titleCLOUD

    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"

    Code Block
    id.getOptions(radiogroup).transform(label)


    getUnselectedOptions

    Status
    colourGreen
    titlefrom v. 2.9.5

    Status
    colourBlue
    titleCLOUD

    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

    Code Block
    id.getUnselectedOptions(radiogroup).transform(label.append(<br/>))


    queryAndRender(<formName:pageId>;<FILTER>;<FIELDS_OR_EXPRESSIONS>;<VIEW_TYPE>)

    Status
    colourGreen
    titlefrom v. 2.10

    Status
    colourBlue
    titleCLOUD

    You can add a ConfiForms Field to your form's view and set it to show the contents of another form within your form

    • <formName:pageId> - name of the form and page id (location of the form) separated by :
    • <FILTER> - ConfiForms Filters , can be dynamic and reference values in a current record via [entry.field_name]
    • <FIELDS_OR_EXPRESSIONS> - list of fields (can contain expressions or virtual functions) to render from the referenced form separated by |
    • <VIEW_TYPE> - how the view shall be rendered. Supported values at this point are:
      • table
      • card
      • list


    Example

    Code Block
    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.

    Code Block
    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".



    queryAndSet(<formName:pageId>;<FILTER>;<FIELD_OR_EXPRESSION>)

    Status
    colourGreen
    titlefrom v. 2.16.9

    Status
    colourBlue
    titleCLOUD


    Support for Sorting in ConfiForms parameter as shown below

    Status
    colourGreen
    titlefrom v. 2.21.3

    queryAndSet(<formName:pageId>;<FILTER>;<FIELD_OR_EXPRESSION>;name ASC LIMIT 1)

    You can set up this function to lookup (query) the value from some form by given filter and you can set the result of this query to a field

    Useful when you want to make a value lookup in ConfiForms IFTTT

    • <formName:pageId> - name of the form and page id (location of the form) separated by :
    • <FILTER> - ConfiForms Filters , can be dynamic and reference values in a current record via [entry.field_name]
    • <FIELD_OR_EXPRESSION> - field to get the value form.

    When multiple records much the filter the value will be concatenated

    Example:

    Code Block
    id.queryAndSet(myform:1111222;myfield:[entry.field];anotherfield)

    same can be done though the _func helper

    Code Block
    _func.queryAndSet(myform:1111222;myfield:[entry.field];anotherfield)
    or
    [entry._func.queryAndSet(myform:1111222;myfield:[entry.field];anotherfield)]
    Status
    colourGreen
    titlefrom v. 2.21.3
    Code Block
    id.queryAndSet(myform:1111222;myfield:[entry.field];anotherfield;LIMIT 1)
    Code Block
    id.queryAndSet(myform:1111222;myfield:[entry.field];anotherfield;created DESC LIMIT 1)

    Status
    colourGreen
    titlefrom v. 2.25.2

    Code Block
    id.queryAndSet(myform:1111222;myfield:[entry.field];sum:(anotherfield);created DESC LIMIT 1)

    See sum:(anotherfield), as an expression to give for the field you want to query on - this way it will attempt to "sum up" found values if all the found values are of numeric type

    Similarly you can just warp the field or and expression into brackets

    Code Block
    (anotherfield)
    ([entry.anotherfield])


    queryAndAggregate(<formName:pageId>;<FILTER>;<FIELD_OR_EXPRESSION>)

    Status
    colourGreen
    titlefrom v. 3.4.5

    Status
    colourBlue
    titleCLOUD

    Same as queryAndSet function mentioned above, but forces the aggregation by the <FIELD_OR_EXPRESSION> (attempts to sum up the values found)



    pageProperties(property_name)

    Status
    colourGreen
    titlefrom v. 2.10.7

    Status
    colourBlue
    titleCLOUD

    pageProperties(property_name, pagePropertiesId)

    Status
    colourGreen
    titlefrom v. 3.4.1

    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)

    Code Block
    mypage.pageProperties(property_name)

    What is page properties:  https://confluence.atlassian.com/doc/page-properties-macro-184550024.html

    Since ConfiForms version 3.4.1 you can give ConfiForms a hint where to look for the property. As the page may have multiple page properties sections and a user can name them using the ID parameter in the page properties macro. ConfiForms is now able to look into a specific page properties macro, if necessary

    Code Block
    mypage.pageProperties(property_name, pagePropertiesId)


    sort(property_name ASC)

    sort(property_name1 ASC, property_name2 DESC)

    Status
    colourGreen
    titlefrom v. 2.11.3

    Status
    colourBlue
    titleCLOUD

    Sorts lists of choices / objects 

    limit(number)

    Status
    colourGreen
    titlefrom v. 2.11.3

    Status
    colourBlue
    titleCLOUD

    Limits the number of items in an array/list

    asUserTimezone

    Status
    colourGreen
    titlefrom v. 2.12.4

    Status
    colourBlue
    titleCLOUD

    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

    Status
    colourGreen
    titlefrom v. 2.12.4


    Since 

    Status
    colourGreen
    title2.13.7
     supports setting the formatting pattern

    asUserTimezoneAwareDate(PATTERN)

    asUserTimezoneAwareDateTime(PATTERN)

    Status
    colourBlue
    titleCLOUD

    Aliases for timezoneAwareDate and timezoneAwareDateTime

    Formats dates in user timezones

    someDate.asUserTimezoneAwareDate

    someDate.asUserTimezoneAwareDateTime


    timezoneOffset

    Status
    colourGreen
    titlefrom v. 2.13.2

    Status
    colourBlue
    titleCLOUD

    Returns offset between server and user's timezones in milliseconds

    htmlToWiki

    Status
    colourGreen
    titlefrom v. 2.13.2

    Status
    colourBlue
    titleCLOUD

    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)

    iterateAndPrint

    Status
    colourGreen
    titlefrom v. 2.13.10

    Now it is possible to iterate through the multi-select fields and print their properties in a convenient way

    For example, iterating on multi user field and printing username and full name of the user in a row for each selected user

    Code Block
    mymultiuserfield.iterateAndPrint([entry.username] - [entry.fullName] <br/>).renderAsHtml

    For comment field

    Code Block
    mycomment.iterateAndPrint(
    <p>[entry.user.asUser.fullName] - [entry.timestamp.formatDate]: [entry.content]</p>).renderAsHtml


    formatToPattern

    Status
    colourGreen
    titlefrom v. 2.13.10

    Status
    colourBlue
    titleCLOUD

    Formats value to given regular expression pattern. For example, to format the phone number given 1234567890 into (123) 456-7890

    You will need to do something like this:\

    Code Block
    myfield.formatToPattern((\d{3})(\d{3})(\d+), ($1) $2-$3)

    Where first parameter is a grouping regular expression:  (\d{3})(\d{3})(\d+)

    And the second one is how the "groups" should be printed (pattern itself):  ($1) $2-$3



    storageToHtml

    Status
    colourGreen
    titlefrom v. 2.14

    Status
    colourBlue
    titleCLOUD

    Attempts to convert/render given value into HTML. Will work when the value is a valid storage format (Atlassian page storage format)




    evaluateFormula(FORMULA)

    Status
    colourGreen
    titlefrom v. 2.17

    Status
    colourBlue
    titleCLOUD

    Evaluates and calculates a given formula. Formula should be given as explained here: Supported math operators, formulas and functions

    Parameters can be given as [entry.field_name] references

    Can be applied on a field or on _func for convenience

    Code Block
    [entry._func.evaluateFormula(IF(EMPTY("[entry.somefield]"), "ERROR", "ALL GOOD"))]

    Or in ConfiForms Field macros it is easier to use via "id" field

    Code Block
    id.evaluateFormula(IF(EMPTY("[entry.somefield]"), "ERROR", "ALL GOOD"))


    formatDuration(PATTERN)

    Status
    colourGreen
    titlefrom v. 2.19.4

    Status
    colourBlue
    titleCLOUD

    This function helps to format numeric value in milliseconds as "duration"

    Example:

    Code Block
    somefield.formatDuration(H:mm:ss)
    somefield.formatDuration(d H:mm:ss)
    somefield.formatDuration(d 'days' H:mm:ss)

    Value of "somefield" needs to be numeric and represent time in milliseconds



    round(scale,roundingMode)

    Status
    colourGreen
    titlefrom v. 2.20.2

    Status
    colourBlue
    titleCLOUD

    Where scale must be an integer

    And rounding modecould be given as a numeric value or as text value

    Text constantNumeric
    UP
                    
    0
    DOWN
                    
    1
    CEILING
                    
    2
    FLOOR
                    
    3
    HALF_UP
    4
    HALF_DOWN
                    
    5
    HALF_EVEN
                    
    6
    UNNECESSARY
                    
    7


    Example: 

    Code Block
    somenumericfield.round(2, HALF_UP)

    same as

    Code Block
    somenumericfield.round(2, 4)


    barcode(type)

    Status
    colourGreen
    titlefrom v. 2.26

    Status
    colourBlue
    titleCLOUD

    Renders value as barcode

    Supported types are:

    • Interleaved2of5
    • Codabar
    • ITF-14
    • Code39
    • Code128
    • EAN-128
    • GS1-128
    • UPC-A
    • UPC-E
    • EAN-13
    • EAN-8
    • POSTNET
    • RoyalMail
    • USPS
    • PDF417


    Code Block
    somevalue.barcode(Codabar)
    somevalue.barcode(Codabar)[entry.somevalue.barcode(Codabar)]

    qrcode

    qrcode(type)

    Status
    colourGreen
    titlefrom v. 2.26

    Status
    colourBlue
    titleCLOUD

    Renders values as QR code

    Supported types are:

    • url (default)
    • SMS
    • MMS
    • email


    Suggesting to use SMS when scanned (field value is preset as phone number)

    Code Block
    somevalue.qrcode(SMS)


    Or as default (url) - field value is set as URL

    Code Block
    somevalue.qrcode

    somevalue.qrcode

    somevalue.qrcode(MMS)

    [entry.somevalue.qrcode]

    [entry.somevalue.qrcode(MMS)]

    isValidPassword

    Status
    colourGreen
    titlefrom v. 2.27.24

    Code Block
    value.isValidPassword()
    value.isValidPassword

    Returns true or false

    Checks the password given in the field value for current user only

    In other words this function can only verify current user's password

    value.isValidPassword():true

    value.isValidPassword():false

    value.isValidPassword:true

    value.isValidPassword:false

    [entry.value.isValidPassword()]

    [entry.value.isValidPassword]

    isValidCaptcha

    Status
    colourGreen
    titlefrom v. 2.27.25

    Code Block
    field.isValidCaptcha() 
    field.isValidCaptcha

    Returns true or false

    field.isValidCaptcha():true

    field.isValidCaptcha():false

    field.isValidCaptcha

    field.isValidCaptcha

    [entry.field.isValidCaptcha()]

    [entry.field.isValidCaptcha]

    variables

    Status
    colourGreen
    titlefrom v. 2.27.26

    You can access the value of a variable defined in ConfiForms configuration: "Variables and Secrets" section. 

    Please note that you can only access variables, but not secrets. The value for the secret will always be returned as empty value

    Code Block
    variables(variable_name)

    field.variables(variable_name)


    queryCount(<formName:pageId>;<FILTER>)

    Status
    colourGreen
    titlefrom v. 2.27.29

    Status
    colourBlue
    titleCLOUD

    You can lookup records number in the form matching your filter

    Code Block
    id.queryCount(myform:1111222;myfield:[entry.field])

    You can refermce to the same page via @self (if your form is located on the same page)

    Code Block
    id.queryCount(myform:@self;*)

    Returns number of records matching (numeric)



    workDaysTo

    Status
    colourGreen
    titlefrom v. 2.28.0

    Status
    colourBlue
    titleCLOUD

    Calculates working days (excluding Saturday and Sunday) between timestamps

    Code Block
    sometimestampfield.workDaysTo([entry.anothertimestampfield])

    If your field is a DatetimeInterval field then have a look at new properties this field has



    daysTo

    Status
    colourGreen
    titlefrom v. 2.28.0

    Status
    colourBlue
    titleCLOUD

    Calculates days between timestamps

    Code Block
    sometimestampfield.daysTo([entry.anothertimestampfield])

    If your field is a DatetimeInterval field then have a look at new properties this field has



    fixHtml

    Status
    colourGreen
    titlefrom v. 2.28.0

    Attempts to clean given HTML and process an xHtml like contents

    Code Block
    somefieldwithhtml.fixHtml

    Expect this method to attempt to close the unclosed tags and remove offensive html code



    removeByRegExp

    Status
    colourGreen
    titlefrom v. 2.28.2

    Status
    colourBlue
    titleCLOUD

    Removes symbols matching given regular expression in the field's value

    field.removeByRegExp(regularExpressionHere)

    [entry.field.removeByRegExp(regularExpressionHere)]


    matches(regular_expression)

    Status
    colourGreen
    titlefrom v. 2.0.1

    Status
    colourBlue
    titleCLOUD

    Matches value by regular expression

    For example:

    Code Block
    field.matches(^[a-zA-Z0-9]*$):true

    Returns true if field's value is alphanumeric and false otherwise

    Use https://regex101.com/ to test your expressions - very helpful and easy to use resource for building regular expressions



    pageWatchers

    Status
    colourGreen
    titlefrom v. 2.24.7


    You can access page watchers on the page object

    Returns a comma separated list of usernames who are page watchers of this page

    Code Block
    pageObjectValue.pageWatchers



    pageContributors

    Status
    colourGreen
    titlefrom v. 2.24.7


    You can access page contributors on the page object

    Returns a comma separated list of usernames who are page contributors of this page

    Code Block
    pageObjectValue.pageContributors

    ...




    Info

    If entry value is null or could not be formatted according to rules then value is returned as-is 

    ...

    Info

    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 


    It is important to understand that it is absolutely totally possible to combine virtual functions WITH field properties

     

    and to chain functions!