Blacklisted/Whitelisted PHP for Calculated Merge Fields

Created by Dakota Martin, Modified on Thu, 12 Jan 2023 at 04:16 PM by Dakota Martin

The Calculated Merge Fields in Actionstep allow you to write in PHP code to create your own merge fields. Not all PHP functions are available to be used. There is a blacklist of some functions which are not allowed due to security concerns and a whitelist of functions which we do allow.


If you try to use a PHP function that is on the blacklist in a Calculated Merge Field it will give you a message saying that that function is not allowed.


/helpdesk/attachments/150002488153

 

There will be functions which are not included on either list. If you use one of these functions you will get a message saying that the function is not supported. In that situation reach out to our support staff by emailing support@actionstep.com and ask if the function can be allowed. If you include a copy of the calculated merge field you are trying to create that will help our programmers decided if the function should be whitelisted or blacklisted. If it is blacklisted they can often suggest an alternative function you could use.

 

Allowed Constants

 

  • SORT_ASC
  • SORT_DESC
  • SORT_REGULAR
  • SORT_NUMERIC
  • SORT_STRING
  • SORT_LOCALE_STRING
  • SORT_NATURAL
  • SORT_FLAG_CASE


Allowed Functions

  • count
  • array_key_exists
  • array_multisort
  • in_array
  • sizeof
  • intval
  • round
  • strval
  • floatval
  • date_add
  • date_create_from_format
  • date_create_immutable_from_format
  • date_create_immutable
  • date_create
  • date_date_Set
  • date_diff
  • date_format
  • date_interval_create_from_date_string
  • date_interval_format
  • date_isodate_set
  • date_modify
  • date_offset_get
  • date_parse_from_format
  • date_parse
  • date_sub
  • date_sun_info
  • date_time_set
  • date_timestamp_get
  • date_timestamp_set
  • date_timezone_get
  • date_timezone_set
  • print_r
  • mktime
  • strtotime
  • getdate
  • localtime
  • date
  • gmdate
  • gmmktime
  • time
  • number_format
  • strtolower
  • strtoupper
  • ucwords
  • ucfirst
  • substr
  • explode
  • implode
  • echo
  • lcfirst
  • ltrim
  • print
  • printf
  • rtrim
  • sprintf
  • sscanf


  • str_ireplace
  • str_pad
  • str_word_count
  • strcasecmp
  • strcmp
  • strip_tags
  • stripcslashes
  • stripos
  • stripslashes
  • stristr
  • strlen
  • strncmp
  • strpos
  • strrchr
  • strrev
  • strripos
  • strrpos
  • strspn
  • strstr
  • strtr
  • trim
  • vfprintf
  • vsprintf
  • wordwrap

 


Disallowed Functions

  • exec
  • passthru
  • system
  • shell_exec
  • popen
  • proc_open
  • pcntrl_exec
  • eval
  • assert
  • preg_replace
  • create_function
  • include
  • include_once
  • require
  • require_once
  • phpinfo

 

Related Articles:

- Calculated Merge Fields

- Merge Field Repeat Blocks

- Merge Field Options

Attachments (1)

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 atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article