Data privacy notice

 

When this content is loaded, usage information is transmitted to Vimeo and may be processed there.

 

             

Placeholder substitution (system)

Modified on Mon, 17 Jul, 2023 at 9:11 AM


Schnittstelle IPluginSystemReplacer

Position of system variable evaluation plugins in FORMCYCLE's program flow. They are run before system variables are processed by FORMCYCLE.


Use cases

This type of plugin allows you to define new system variables or modify how existing variables are being evaluated. These plugins will be run before variables are processed by formcycle.

For example, this allows you to change the URLs of certain system variables and to redirect them to other URLs.

System variables use the following syntax:


[%$variableName>%]


When multiple system variable evaluation plugins are installed, their order of execution is arbitrary. You should not rely on a certain fixed order.


System variable evaluation plugins are run for all forms of the client they belong to, or for all existing forms when installed as a system plugin. We recommend you check whether the plugin should be executed for the current form, for example by defining a plugin property containing a list of allowed forms.


Method signature

IPluginSystemReplacerRetVal replace(IPluginSystemReplacerParams params) throws FCPluginException

Parameters:

An object of type IPluginSystemReplacerParams is passed to the execute method, providing access to the following properties:

  • The entire variable string, including its syntax, eg. [%$ATTACHMENT_LIST%]. (getPlaceholder())
  • The variable name, without its syntax, eg. ATTACHMENT_LIST. (getPlaceholderContent())
  • The workflow processing context (getWorkflowProcessingContext()), granting access to:
    • The current form record (getVorgang())
    • The form data (getFormDataAdapter())
    • Session attributes (getSessionAttributes())
    • A temporary directory for storing data (getTempDirPath())

Return value:

The execute method must return an object implementing IPluginSystemReplacerRetVal.

The class PluginGenericReplacerRetVal provides a reference implementation. Its constructor takes the string containing the evaluated value of the variable.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article