Share this page

# web_save_param_length

Miscellaneous Functions

Saves the length of a parameter.

    int web_save_param_length( const char *Param, const char *Base, LAST );

Argument | Description
--- | ---
Param | The name of the parameter of which the length is saved.
Base | The representation of the length in the parameter. Base is one of `Decimal` or `Hexadecimal`

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

## Parameterization

Parameterization is not applicable to this function.

## General Information

web_save_param_length creates a new parameter named "<Param>_Length", if it does not already exist, and saves the length of Param in parameter "<Param>_Length".

For example, the call:

web_save_param_length("Rowid", "Base=Hexadecimal", LAST );

creates a new parameter named "Rowid_Length". The value of Rowid_Length after the call is the length of the value of Rowid.

## Example

In these examples, web_save_param_length creates three new parameters, Param7_Length, Param10_Length,and Param16_Length, and stores the length of each respective source parameter as a hexidecimal number.

        // Create a parameter 7 characters long
        lr_save_string("ABCDEFG", "Param7");
        web_save_param_length("Param7", "Base=Hexadecimal", LAST );
        // Output: Action.c(9): Notify: Saving Parameter "Param7_Length = 7"
        // Create a parameter 10 characters long
        lr_save_string("ABCDEFGHIJ", "Param10");
        web_save_param_length("Param10", "Base=Hexadecimal", LAST );

    //Output is in hexadecimal:
        //Action.c(14): Notify: Saving Parameter "Param10_Length = A"
        // Create a parameter 16 characters long
        lr_save_string("ABCDEFGHIJKLMNOP", "Param16");
        web_save_param_length("Param16", "Base=Hexadecimal", LAST );
        //Output is in hexadecimal:
        //Action.c(18): Notify: Saving Parameter "Param16_Length = 10"

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