Child pages
  • Accessing field values and properties

Versions Compared

Key

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

...

myfeldmyfeldmyfeld
Field typeAccessing in ConfiForms Field macroAccessing though [entry.] notationUsing in filtersSortingRemarks
Textmyfield[entry.myfield]

myfield:*test

myfield:test*

myfield:*test*

myfield:*

as text
Action ButtonmyfieldN/AN/AN/AN/A
Autolinkmyfield[entry.myfield]same as text fieldas textonly dynamic part is taken when shown as [entry.] notation
Autonumbermyfield[entry.myfield]same as text fieldas textautonumber with previx
AutopagemyfieldSee page typeSee page typeSee page typeSee page type
Calculatedmyfield[entry.myfield]Same as numeric fieldas numbernon-numeric values are set as 0 in sorting
CaptchamyfieldN/AN/AN/AN/A
Checkbox

myfield

myfield.label

[entry.myfield]

[entry.myfield.label]

myfield:true

myfield:false


Returns true or false

By using .label you can access checkbox field label you set

Checkbox group

myfield

myfield.label

[entry.myfield]

[entry.myfield.label]

myfield:*fieldvalue* to ensure it is matchedas text

Comment

Status
colourGreen
titleSince 2.13.9

mycommentfield.user

mycommentfield.timestamp

mycommentfield.content

Warning

Important! A multi-value field

Which means to access any property you will need to transform it first

mycommentfield.transform(user).asList - will give you a list of usernames for users who added a comment

mycommentfield.transform(content).asList - will get you a comma separated list of comments





Currencymyfield[entry.myfield]Same as numeric fieldas number
Date

myfield

myfield.timestamp

[entry.myfield] 

[entry.myfield.timestamp] 

Same as numeric fieldas number

timestamp value

Date and Datetime field types allow the following metaparams to be given as input

[now], [tomorrow], [yesterday], [today], [today]-days(n), [datetimeyyyyMMdd HH:mm], [dateyyyyMMdd]

Basically, same as in ConfiForms Filters

Datetime

myfield

myfield.timestamp

[entry.myfield] 

[entry.myfield.timestamp] 

Same as numeric fieldas number

timestamp value

See above

Datetime interval



myfield

myfield.startDateFormatted

myfield.endDateFormatted

myfield.startDate

myfield.endDate

myfield.startDate.timestamp

myfield.endDate.timestamp

myfield.asPeriodFormatted

myfield.interval - returns interval in minutes between start and end dates

Status
colourGreen
titleSince 2.28.0

Status
colourBlue
titleCLOUD

myfield.periodInSeconds

myfield.periodInMinutes

myfield.periodInHours

myfield.periodInDays

myfield.periodInWorkDays

[entry.myfield]

[entry.myfield.startDateFormatted]

[entry.myfield.endDateFormatted]

[entry.myfield.startDate]

[entry.myfield.endDate]

[entry.myfield.startDate.timestamp]

[entry.myfield.endDate.timestamp]

[entry.myfield.asPeriodFormatted]

[entry.myfield.interval]

Status
colourGreen
titleSince 2.28.0

Status
colourBlue
titleCLOUD

[entry.myfield.periodInSeconds]

[entry.myfield.periodInMinutes]

[entry.myfield.periodInHours]

[entry.myfield.periodInDays]

[entry.myfield.periodInWorkDays]

myfield.startDate:

myfield.endDate:

conditions as in numeric field

as number by start datetimestamp value
DB dropdown

myfield

myfield.id

myfield.label

see remarks ->

Same as normal dropdown
DB multi-selectmyfieldsee remarks ->

Same as normal multi-select
DB radio groupmyfieldsee remarks ->

Same as normal radio group
DB checkboxmyfieldsee remarks ->

Same as normal checkbox
Drawing canvasmyfieldN/AN/AN/Ainternal format is returned
Dropdown

myfield

myfield.id

myfield.label

[entry.myfield]

[entry.myfield.id]

[entry.myfield.label]

myfield:ID

myfield.label:LABEL

as text

Each dropdown choice has ID and LABEL

[entry.myfield] returns ID

Dynamic Dropdown

myfield

myfield.id

myfield.label

[entry.myfield]

[entry.myfield.id]

[entry.myfield.label]

myfield:*fieldvalue* to ensure it is matchedas text

Each dropdown choice has ID and LABEL

[entry.myfield] returns ID

Dynamic Multilabel

myfield

myfield.id

myfield.label

[entry.myfield]

[entry.myfield.id]

[entry.myfield.label]

myfield:*fieldvalue* to ensure it is matchedas text

Each choice has ID and LABEL

[entry.myfield] returns ID

Enroll buttonmyfieldN/AN/AN/A
Filemyfield[entry.myfield] - will show as linksame as text, see remarksas textonly attachment/file name is in search
Formulamyfield[entry.myfield]same as numeric fieldas numbernon-numeric values are set as 0 in sorting
Htmlmyfield[entry.myfield]same as text typeas text
Insight

myfield

myfield.attributes.objectTypeAttribute(objectTypeAttributeId=46).objectAttributeValues.value

[entry.myfield]

[entry.myfield.attributes.objectTypeAttribute(objectTypeAttributeId=46).objectAttributeValues.value]

 

See more details here: Accessing JSON structures. The tutorial is for ConfiDoc plugin but is perfectly validfor ConfiForms (easpecially from teh perspective of accessing the Insight object attributes)




Linkmyfield[entry.myfield]same as text typeas text
Hiddenmyfield[entry.myfield]same as text typeas text
Masked Textmyfield[entry.myfield]same as text typeas text
Multi Selectmyfield[entry.myfield]same as dropdown (ID and LABEL properties)as text
Numeric fieldmyfield[entry.myfield]

myfield:>=

myfield:>

myfield:<=

myfield:<

myfield:

as number
JIRA issue

myfield

myfield.key

myfield.title

myfield.summary (same as title)

myfield.description

myfield.link

myfield.status


Status
colourGreen
titlev 1.35.5

Any JIRA field which is provided via JIRA REST API

For example:

myfield.fields.assignee.emailAddress

myfield.fields.reporter.displayName

See also: Using Field Definition Rule to request data from JIRA and set it to ConfiForms fields 

Status
colourGreen
title3.10.0

Status
colourBlue
titleCLOUD

myfield.exists - returns true or false to verify if the value stored in this field corresponds to Jira issue

[entry.myfield]

[entry.myfield.key]

[entry.myfield.title]

 

[entry.myfield.summary] (same as title)

[entry.myfield.description]

[entry.myfield.link]

[entry.myfield.status]

same as text type and only by keyas text
JQL

myfield

myfield.jql

myfield.count

[entry.myfield]

[entry.myfield.jql]

[entry.myfield.count]

Renders as link to JIRA with number of matching issues

2 additional properties available: jql and count



Jira Select Field

Depends on a fiel type in Jira

Field in JiraAccessing in ConfiForms FieldAccessing raw values in IFTTTs/PlainViews/Calculations/Mappings

Single choice select

Code Block
myfield
Code Block
[entry.myfield]

Multi-select field

Code Block
myfield
myfield.id
myfield.label
Code Block
[entry.myfield]
[entry.myfield.id]
[entry.myfield.label]

Cascading field

Code Block
myfield
myfield.id
myfield.parentId
myfield.label
myfield.parentLabel
myfield.parent.id
myfield.parent.label

myfield.childId
myfield.childLabel
myfield.child.id
myfield.child.label

myfield.exportValue
myfield.empty - to check if the field is empty (returns true (if has no value) or false)
Code Block
[entry.myfield]
[entry.myfield.id]
[entry.myfield.parentId]
[entry.myfield.label]
[entry.myfield.parentLabel]
[entry.myfield.parent.id]
[entry.myfield.parent.label]

[entry.myfield.childId]
[entry.myfield.childLabel]
[entry.myfield.child.id]
[entry.myfield.child.label]

[entry.myfield.exportValue]
[entry.myfield.empty]






Page/Blog post

myfield

myfield.* - see remarks

[entry.myfield]

[entry.myfield.*] - see remarks

same as text, for properties list see remarksas text, by default pageIdall properties of

AbstractPage class (see Confluence API docs). For cloud see https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-get 

Examples:

method in classHow to access

getTitle()

myfield.title

getSpaceKey()

myfield.spaceKey
getCreatorName()myfield.creatorName
getVersion()myfield.version
getCreationDate()myfield.creationDate
... any other get method from Page class
Passwordmyfield[entry.myfield]same as text typeas text
Radio group

myfield

myfield.id

myfield.label

 

[entry.myfield]

[entry.myfield.id]

[entry.myfield.label]

myfield:ID

myfield.label:LABEL

as text

Each choice has ID and LABEL

[entry.myfield] returns ID

Readonlymyfield[entry.myfield]same as text typeas text
SectionmyfieldN/AN/AN/A
Simple Datemyfield[entry.myfield]Same as numeric fieldas numbertimestamp value
Smart Classifier

myfield

myfield.* - see remarks

[entry.myfield]

[entry.myfield.*] - see remarks

Depends on a field referenced. If [entry.myfield] or just "myfield" is referenced then in most cases it acts as text.

But with "smart fields" you reference a record in another form and that means through this reference you can get ANY field of that record, including other smart fields. That said, you can build quite a property graph to get any value, which is lazy loaded for you

depends on a field referenced

Properties you can access totally depend on a structure of the record in the form you reference. You can access ANY field value through this notation, including other smart fields which will be lazy loaded for you.

Example:

Code Block
[entry.myfield.field_in_another_form]
[entry.myfield.another_smartfield_in_another_form.somefield]
Smart Dropdown

myfield

myfield.* - see remarks

[entry.myfield]

[entry.myfield.*] - see remarks

See Smart Classifierdepends on a field referencedSee Smart Classifier
Smart Multiselect

myfield

myfield.* - see remarks

[entry.myfield]

[entry.myfield.*] - see remarks

See Smart Classifierdepends on a field referencedSee Smart Classifier
Smart Checkbox

myfield

myfield.* - see remarks

[entry.myfield]

[entry.myfield.*] - see remarks

See Smart Classifierdepends on a field referencedSee Smart Classifier
Smart Radio buttons

myfield

myfield.* - see remarks

[entry.myfield]

[entry.myfield.*] - see remarks

See Smart Classifierdepends on a field referencedSee Smart Classifier
Status

myfield

myfield.id

myfield.label

[entry.myfield]

[entry.myfield.id]

[entry.myfield.label]

Same as dropdown field, with IDs and LABELs. But has predefined values for IDs (depending on a colour)

as textSee remarks for dropdown field
Textareamyfield[entry.myfield]same as text typeas text
User

myfield

myfield.username

myfield.fullName

myfield.picture

myfield.email

myfield.lastName

myfield.firstName

myfield.key 

Status
colourGreen
titlefrom 2.12.5

myfield.accountId

Status
colourBlue
titleCLOUD

myfield.exists (true or false) - to check if this value can be resolved to active user object

[entry.myfield]

[entry.myfield.username]

[entry.myfield.fullName]

[entry.myfield.picture]

[entry.myfield.email]

[entry.myfield.lastName]

[entry.myfield.firstName]

same as text type, but you can query for field properties:

myfield:

myfield.username:

myfield.fullName:

myfield.picture:

myfield.email:

myfield.lastName:

myfield.firstName:

as text, see remarks

sorting is by username field

lastName and firstName are synthetic properties, which we try to extract from a given fullName.

We consider las word as lastName and what is given before is taken as firstName. This solution does not work for the whole world, but this is the best option we can offer you at the moment

User (multiselect)

myfield

Virtual functions to transform an array of User objects. Each User object in the User multi-select field has the same properties as the normal User object (see above)

[entry.myfield]

[entry.myfield.asUserFullNames]

[entry.myfield.asUserEmails]

* - see remarks

Same as Useras text

You can show user full names in a list, or emails or (when no helper function is used) as list of usernames

See Virtual functions

Voting controlmyfieldN/AN/AN/AN/A
Webservice backed fields

As with "JIRA issue" fields you can access ANY property returned by the web service for the option you map with the field.

For example:

Code Block
[
  {
    id: 1,
    name: "Alex",
    sn: "E123"
  },
  {
    id: 2,
    name: "Vlad",
    sn: "C100"
  }
]

You can map the structures of an array to be used as options for the web services backed fields in ConfiForms

Assuming your field is called "myfield"

then to access the properties you will need to put the following expressions

Code Block
myfield.id
myfield.name
myfield.sn

There is also a synthetic property called "label" for the field what you use as "label" in your web services backed field

Important note: when your web service returns a structure with ID and you map another field to be used as ID then original data will not be accessible, as mapping overrides it.






WYSIWYG simple editormyfield[entry.myfield]same as text typeas text


Accessing through [entry.] notation can be used in ListView, in PlainView, in CalendarView and in IFTTT macro body, as well as when referencing ConfiForms record fields in macro parameters

...

Panel
borderStylenone
Variable


[owner]

Deprecated, use

[entry._user]

current record owner (ownedBy field) or Anonymous (when user is "Anonymous")

[modifier]

[user]

Deprecated, use

[entry._user]

current record modifier (User's full name)
[now]

Current timestamp as expression. NB! Not evaluated to the value when in pre-sets and stays as [now] which results ALWAYS in current date. Use [entry._now] for the value

Only on server/dc version


[today]Deprecated

Current timestamp as expression. Does not get evaluated to actual timestamp, but shows "current time" when set on the field

Use [entry._today] instead or [entry._now]


[user.name]

Deprecated, use

[entry._user.username]

current user's username
[user.fullName]

Deprecated, use

[entry._user.fullName]

current user's full name
[user.email]

Deprecated, use

[entry._user.email]

current user's email
[entry._user]_usercurrent user object (can access email, name, and fullname, see accessing properties for user fields)User field
[entry._now]_now

current timestamp, which can be converted to date using Virtual functions or used for comparison against other date/datetime fields

On cloud this returns timestamp in user's TZ

Datetime
[entry._page]_pagecurrent page id (present in most cases, but not always)Page
[entry._storagePage]_storagePageform's page idPage
[entry._today]_today

current timestamp (for date, without time)

On cloud this returns value for today in user's TZ

Date
[entry._count]_countnumber of records in the datasetNumeric
[entry._total]_totaltotal number of records in the datasetNumeric
[entry._formName]_formName

Name of the form is now available in the context 

Status
colourGreen
titleSince 2.2.0

String


When used with ConfiForms TableViewMerger macro you have access to the following variables



Type
_sourcePageName of the page the form is locatedPage
_sourceFormName of the form where this data row is taken fromText


When ConfiForms IFTTT macro is processed it does temporarily make these variable accessible

Available in

Status
colourGreen
titleSince 2.21.0
and
Status
colourBlue
titleCLOUD



Type
_iftttBodyIFTTT macro bodyText
_iftttBodyPreparedProcessed/Prepared IFTTT macro bodyText

...

Info

Standard set of objects inside the context (Velocity templates)


context.put("entry", entry); <- ConfiForms Entry (raw)
context.put("user", user); <- Confluence user object
context.put("page", contentObject); <- AbstractPage object

From ConfiForms version 1.49.3 there are additional objects in the context:

context.put("generalUtil", newcom.atlassian.confluence.util.GeneralUtil());
context.put("res", ServletActionContext.getResponse());
context.put("req", ServletActionContext.getRequest());
context.put("action", com.atlassian.confluence.renderer.radeox.macros.MacroUtils.getConfluenceActionSupport());

...