Share this page

# sapgui_is_checkbox_selected

Verification and Data Retrieval Functions

Returns the checkbox state.

    int sapgui_is_checkbox_selected( const char *description, const char *checkBoxID, [args,] LAST );

description | User entered text to aid in understanding script
checkBoxID | Object ID Strings
args | Optional Arguments
LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used.

The sapgui_is_checkbox_selected verification function returns the status of a checkbox. The function is True if the checkbox is selected and False if it is cleared.

## Return Values

This function returns True (-1) or False (0).

## Parameterization

You can parameterize all string (char type) arguments.

## Example

The following example uses sapgui_is_checkbox_selected to confirm a successful change of checkbox state.

Copy code

    // Turn checkbox status off (False)
    sapgui_set_checkbox("Movie",
        "False",
        "usr/chkWBTABLE-MOVIE",
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui5022",
        END_OPTIONAL);
    // Output is "Checkbox is not set"
    if (sapgui_is_checkbox_selected("Confirm Checkbox State", "usr/chkWBTABLE-MOVIE", LAST))
            lr_output_message("Checkbox is set");
        else
            lr_output_message("Checkbox is not set");
    // Turn checkbox status on (True)
    sapgui_set_checkbox("Movie",
        "True",
        "usr/chkWBTABLE-MOVIE",
        BEGIN_OPTIONAL,
            "AdditionalInfo=sapgui5022",
        END_OPTIONAL);
    // Output is "Checkbox is set"
    if (sapgui_is_checkbox_selected("Confirm Checkbox State", "usr/chkWBTABLE-MOVIE", LAST))
            lr_output_message("Checkbox is set");
        else
            lr_output_message("Checkbox is not set");

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: