Form Runner functions
- Availability
- Namespace
- Base functions
- fr:app-name())
- fr:created-dateTime())
- fr:dataset())
- fr:document-id())
- fr:form-name())
- fr:form-version())
- fr:is-design-time())
- fr:is-form-data-saved())
- fr:is-form-data-valid())
- fr:is-noscript())
- fr:is-readonly-mode())
- fr:is-wizard-body-shown())
- fr:is-wizard-first-page())
- fr:is-wizard-last-page())
- fr:is-wizard-toc-shown())
- fr:lang())
- fr:mode())
- fr:modified-dateTime())
- fr:run-process())
- fr:run-process-by-name())
- Authentication functions
- See also
Availability
[SINCE Orbeon Forms 2016.2]
These functions are only available within the context of Form Runner.
Namespace
These functions are in the Form Runner namespace:
http://orbeon.org/oxf/xml/form-runner
This namespace is usually bound to the fr:
prefix:
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
Base functions
fr:app-name()
fr:app-name() as xs:string
Return the form's application name.
fr:created-dateTime()
[SINCE Orbeon Forms 2016.3]
fr:created-dateTime() as xs:dateTime?
Return the creation date of the current form data as of the last read from the database if available, and the empty sequence otherwise (such as in "new" mode).
fr:dataset()
[SINCE Orbeon Forms 2017.1]
fr:dataset($dataset-name as xs:string) as xs:string?
Return the root element of the XML document containing the given dataset.
If the dataset does not exist, return the empty sequence.
For more on datasets, see Datasets.
fr:document-id()
fr:document-id() as xs:string
Return the form's document id.
fr:form-name()
fr:form-name() as xs:string
Return the form's form name.
fr:form-version()
fr:form-version() as xs:integer
Return the form definition's current version. By default, when versioning is not enabled, or in test
mode, return 1
.
fr:is-design-time()
fr:is-design-time() as xs:boolean
Return whether the form is shown at design time within Form Builder.
This function is particularly useful for XBL components.
fr:is-form-data-saved()
fr:is-form-data-saved() as xs:boolean
Return whether the form data has been saved (including after the set-data-status
action was called with a status
parameter set to safe
).
fr:is-form-data-valid()
fr:is-form-data-valid() as xs:boolean
Return whether the form data is valid, that is the form data does not contain any errors.
fr:is-noscript()
Return whether the form is in noscript mode.
fr:is-noscript() as xs:boolean
fr:is-readonly-mode()
fr:is-readonly-mode() as xs:boolean
Return whether the current page is in a readonly mode such as view
, pdf
, or email
.
fr:is-wizard-body-shown()
fr:is-wizard-body-shown() as xs:boolean
Whether the wizard's body is visible.
fr:is-wizard-first-page()
[SINCE Orbeon Forms 2016.3]
fr:is-wizard-first-page() as xs:boolean
Whether the currently-shown wizard page is the first relevant page.
fr:is-wizard-last-page()
[SINCE Orbeon Forms 2016.3]
fr:is-wizard-last-page() as xs:boolean
Whether the currently-shown wizard page is the last relevant page.
fr:is-wizard-toc-shown()
fr:is-wizard-toc-shown() as xs:boolean
Whether the wizard's table of content is visible.
fr:lang()
fr:lang() as xs:string
Return the form's current language.
fr:mode()
fr:mode() as xs:string
Return the Form Runner mode.
fr:modified-dateTime()
[SINCE Orbeon Forms 2016.3]
fr:modified-dateTime() as xs:dateTime?
Return the modification date of the current form data as of the last read from the database if available, and the empty sequence otherwise (such as in "new" mode).
fr:run-process()
fr:run-process-by-name($scope as xs:string, $process as xs:string) as item()?
Run the given process given a scope and process content.
This function returns the empty sequence.
Example:
<xf:action type="xpath">
fr:run-process('oxf.fr.detail.process', 'set-data-status(status = "safe")')
</xf:action>
fr:run-process-by-name()
fr:run-process-by-name($scope as xs:string, $process as xs:string) as item()?
Run the given process given a scope and process name.
This function returns the empty sequence.
Example:
<xf:action type="xpath">
fr:run-process-by-name('oxf.fr.detail.process', 'save')
</xf:action>
Authentication functions
fr:can-create()
[SINCE Orbeon Forms 2017.1]
fr:can-create() as xs:boolean
Whether the current user has the create
permission for the current app/form name (detail page only).
fr:can-delete()
[SINCE Orbeon Forms 2017.1]
fr:can-delete() as xs:boolean
Whether the current user has the delete
permission for the current form data (detail page only).
fr:can-read()
[SINCE Orbeon Forms 2017.1]
fr:can-read() as xs:boolean
Whether the current user has the read
permission for the current app/form name (detail page only).
fr:can-update()
[SINCE Orbeon Forms 2017.1]
fr:can-update() as xs:boolean
Whether the current user has the update
permission for the current form data (detail page only).
fr:user-ancestor-organizations()
[SINCE Orbeon Forms 2016.3]
fr:user-ancestor-organizations(
$leaf-org as xs:string
) as xs:string*
Seexxf:user-ancestor-organizations()
.
fr:user-group()
fr:user-group() as xs:string?
Seexxf:user-group()
.
fr:user-organizations()
[SINCE Orbeon Forms 2016.3]
fr:user-organizations() as xs:string*
fr:user-roles()
fr:user-roles() as xs:string*
Seexxf:user-roles()
.
fr:username()
fr:username() as xs:string?
Seexxf:username()
.
See also
- Blog post: A stable function library for Form Runner