Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Dell EMC DataIQ Developer Guide

PDF

Replacement variables

When converting a ClarityNow! Custom Context Menu (CCM) to a DataIQ custom action script, change the substitution variable strings to DataIQ-compatible replacement variables to reference things like user information or items that the user has selected in the GUI.

Example command-line script containing replacement variables

command: "python2.7 plugin_script.py --user='%u' --group='%group'"

In this example, "%u" is be replaced with the user's username, and "%group" is replaced with the user's DataIQ group(s).

Recommended variables

%pfile or %{pfile} A list of selected physical paths in the UI. The plugin's back-end places this list in a temporary file, and replaces %pfile with the path to that temp file.
%vfile or %{vfile} A list of selected virtual paths in the UI. The plugin's back-end will place this list in a temporary file and replace %vfile with the path to that temp file.
%u or %{u} Username of the DataIQ user who is running this menu item.
%group or %{group} Comma-separated list of the DataIQ groups that the user who is running this menu item belongs to.
%validate or %{validate} A validation number, used as an additional check whether to display an item. Before displaying a given item, DataIQ calls the script with %validate set to 1.
  • If the script returns a non-zero value, the custom action is not shown.
  • When actually executing the custom action (not validating the dynamic display of the custom action), %validate is replaced by 0.
Note: This feature is performance-sensitive, because the UI may be blocked for the duration of the dynamic display validation. If the display validation is time-consuming, the custom action should not use this. Instead, allow the custom action to be displayed and have execution of the plugin fail with an appropriate error message to the user.
%guitoken or %{guitoken} The job id (a number), generated by the DataIQ Plugin Manager. Use this to interact with a user via HTML forms. From the Python API, use the showHtmlForm() method to display the form. The GUI token (or job id) passed here is a required argument of that method. The token is valid for the duration of the execution of the custom action.
%search or %{search} The search text that the user executed this action under.

Legacy variables

These variables still work, but are no longer recommended.

Name Description
%p or %{p} A single physical path, selected in the GUI when the request to execute is initiated. For increased security, use %pfile instead.
%v or %{v} A single virtual path, selected in the GUI when the request to execute is initiated. For increased security, use %vfile instead.

No longer supported

These variables do not work in the current version of DataIQ:

%image or %{image} In ClarityNow this referred to a temporary file that a plugin could write to in order to display an image in the GUI. DataIQ uses image data returned directly through the plugin instead.
%text or %{text} Like with ClarityNow this referred to a temporary file that plugin code could write HTML into. This is now done by directly returning HTML to DataIQ.
%clip or %{clip} A temp file containing the contents of the user's clipboard. For security reasons this is no longer provided.
%seq or %{seq}

String describing the names of the files in a sequence. The format is: seqPrefix;seqSuffix;seqNDigits;seqFrom;seqTo, where:

  • seqPrefix is the prefix string of the set of file names
  • seqSuffix is the suffix string of the set of file names
  • seqNDigits is the number of digits to place between the prefix and the suffix
  • seqFrom is the number of the first file in the sequence
  • seqTo is the number of the last file in the sequence

%seq is replaced with 'None' if the target is not a sequence. Using this variable hides the item when multiple paths are selected.

%maxXY or %{maxXY} Originally the plugin window size on the user screen. Hardcoded to “200x200”.
%clientIP Originally the connecting client IP address. Hardcoded to “0.0.0.0”.
%clientLogin or %{clientLogin} Originally the type of login for the client. Hardcoded to “Browser”.
%json or %{json} The path to a temporary file containing all subsequent parameters on the command line in JSON format. Note: This command is generally no longer useful.

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\