M3_H5_ AutoComplete

Use this H5 script to perform a smart search of primary data based on the defined argument. You can use this script in any input field on a panel. The script performs a search and shows all possible suggestions with returned values that correspond to key search fields. When you select a suggestion, the value of the first key search field populates the field.

Prerequisite

The script works for any API transaction that has 'SQRY' as the input parameter.

Script arguments

Examples of arguments are as follows:

  • Argument to be used on 'Customer Order. Open' (OIS100/A) to get customer records based on the search.

    OACUNO,CRS610MI,SearchCustomer,RESP,CUNM,CUNO

    This table shows the objects included in the argument and their corresponding descriptions:
    Argument Example Optional Descriptions
    Search field OACUNO No The argument indicates the field where you will perform the search.
    Program CRS610MI No The argument indicates the API transaction required to retrieve the data.
    Transaction SearchCustomer No The argument indicates the information that you must search for.
    Search criteria RESP,CUNM,CUNO No The fields where the search is performed.

    When a suggested value is selected, the value of the first key search field populates the input field. In the given example, the value to be shown is OACUNO.

    Widget height empty Yes To change the height of the widget menu, you can supply the number or height in pixels as the last argument. You can also use the default value that is set to 100.
  • Argument to be used on 'Purchase Agreement. Open' (PPS100/B1) to get supplier data while creating purchase agreements.

    W1SUNO,CRS620MI,SearchSupplier,SUNO,SUNM

    This table shows the objects included in the argument and their corresponding descriptions:
    Argument Example Optional Descriptions
    Search field W1SUNO No The argument indicates the field where you will perform the search.
    Program CRS620MI No The argument indicates the API transaction required to retrieve the data.
    Transaction SearchSupplier No The argument indicates the information that you must search for.
    Search criteria SUNO,SUNM No The fields where the search is performed.

    When a suggested value is selected, the value of the first key search field populates the input field. In the given example, the value to be shown is W1SUNO.

    Widget height 150 Yes To change the height of the widget menu, you can supply the number or height in pixels as the last argument. You can also use the default value that is set to 100.