Share this page

# Attributes for Save Parameter Registration Functions

- DFES: Comma separated list of Data Formats Extensions that are to be used before the required search operation is to be performed. Optional.
  If you use DFEs on a 64-bit Linux system, ensure that the 32-bit version of keyutils-libs.so (keyutils-libs.i686) is installed.

- NOTFOUND: The handling option when the search item is not found and an empty string is generated. The search item can be a boundary or an XPath, depending on the function. Optional.
  `"Notfound=error"`, the default value, causes an error to be raised when a search item is not found.
  `"Notfound=warning"` does not issue an error. If the search item is not found, it sets the parameter count to 0, and continues executing the script. The `"warning"` option is ideal if you want to see if a string was found, but you do not want the script to fail.
  Note: If Continue on Error is enabled for the script, then even when NOTFOUND is set to `"error"`, the script continues when the search item is not found, but an error message is written to the Extended log file.
  Optional.

- Ordinal: Indicates the ordinal position or instance of the match. In addition to passing a number, you can specify `LAST`. If you specify `All`, the parameter values are saved in an array. See Parameter Arrays.
  Optional. The default instance is 1.
  This attribute does not apply to web_reg_save_param_xpath or web_reg_save_param_json.

- SaveLen: The length of a sub–string of the found value, from the specified offset, to save to the parameter.
  Optional. The default is –1, indicating to save to the end of the string.
  This attribute does not apply to web_reg_save_param_attrib, web_reg_save_param_xpath, web_reg_save_param_json, or web_reg_save_param_regexp.

- SaveOffset: The offset of a sub–string of the found value to save to the parameter. The offset value must be non–negative.
  This attribute does not apply to web_reg_save_param_attrib, web_reg_save_param_xpath, web_reg_save_param_json, or web_reg_save_param_regexp.
  Optional. The default is 0.

Note: If "Notfound=warning" is used without "Ordinal=All", the parameter is not set if the capture pattern does not match the response. You can check if the parameter was captured using lr_eval_string to compare it to a literal string. For example:

Copy code

    lr_save_param_regexp (
       bufferToSearch,
       strlen(bufferToSearch),
       "RegExp=(XX..YY)",
       "Notfound=warning",
       "ResultParam=reloadTargets",
       LAST );

    // If lr_eval_string("{reloadTargets}") returns the literal string {reloadTargets},
    // then the parameter was never set. This means no match was found.
    if (strcmp(lr_eval_string("{reloadTargets}"), "{reloadTargets}") == 0)
         lr_output_message("reloadTargets was not set");
    else
         lr_output_message("reloadTargets was set to %s", lr_eval_string("{reloadTargets}"));

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: