Skip to main content

Variable Pattern

The variable syntax begins with a colon, including :currentData, :formData, :response, :context, :params, :searchParams. In the component's property list, whether Variable Pattern is supported` is checked.

:currentData

:currentData represents the field of the current data. like

:currentData.id represents the id of the current data. If the use place is not in the table row, data component Data container, List component, etc., then :currentData is equal to :formData.

Since :currentData is very commonly used, you can use abbreviation syntax, you can omit :currentData and write :id directly.

:formData

A field that represents the use of form data.

:response

:response can only be used in Button's actions, representing the return value of the previous action.

:context

  • :context has a variety of data:
    • :context.userProfile represents the user information object. The specific usage is such as context.userProfile.id represents the id of the current user.
    • :context.pageType represents the type of the current page. pageType has only the following values:
      • Equal to form-create, the current page is Form: Create data Page.
      • Equal to form-edit, the current page is the Form: Edit Data Page.
      • Equal to form-view, the current page is the Form: View Data Page.
      • Equal to flow-create, the current page is flow: Create a new form trigger process page.
      • Equal to flow-create-by-edit-form, the current page is the flow: Edit form trigger process page.
      • Equal to flow-create-by-approval, the current page is the process: approval trigger process page.
      • Equal to flow-edit, the current page is flow: Edit form node page.
      • Equal to flow-approval, the current page is the process: approval page.
    • :context.pbcToken, representing the token of the current PBC.
    • :context.formEntityToken, current form token.
    • :contextx.formEntityLayoutToken, the current form layout token.
    • :context.formEntityDataId, the id of the current form data.
    • :context.approvalResult, approval result. There are only two fixed values for the approval result:
      • APPROVAL, approved.
      • DISAPPROVAL, approval is refused.
    • :context.schemaId, token of the current page.
    • :context.isInDialog, indicating that it is currently in a pop-up window opened by Button.

:params

:params represents the value of the current page url path parameter.

:searchParams

:params represents the value of the current page url search parameter.

:auth

:auth represents the permission information of the current user. Two fixed values can be used:

  • :auth.accessToken
  • auth.refreshToken

:i18n

  • :i18n means international information. Only one of the following values can be used:
    • :i18n.language, the language of the current website.

Translation (no colon parsing)

Normally, in properties that support Variable Pattern, all strings starting with : will be parsed as variables that need to be parsed according to the following.

For example: /abc/def/:name/xyz. If the value of the name field is 123, then the string will be parsed as /abc/def/123/xyz.

When there is a : string that contains : that does not require parsing, you can use the translation symbol \ to translate this :.

For example: linking to a fixed port /abc/def/xyz\:9092 will finally output the link /abc/def/xyz:9092, and 9092 will not be parsed as a variable.