In this example, an SAP material number is entered in an input field and the possible hits are displayed in a dropdown list. If a material is selected in the drop-down list, the material text is to be displayed in another field.
Step 1: Define text fields
In our Nintex form we need three fields with designations:
The first field Material Number of type Single Line Textbox is the input field and contains the material number. In the second field Suggested material of type Choice, the possible hits for the material number entered are displayed in a dropdown list and can be selected. The third field Material of type Single Line Textbox displays the material long text for the selected material.
Then call up the settings for the Choice field.
Since this is only a display field, you can also define under Appearance that the field is only to be displayed and that no entries are allowed.
The function tEcs.executeXql is called in the code to read the material number and the material long text from the SAP table MAKT.
Step 3: Executing the Nintex Form
Now execute the form and enter a material number. The hits for the entry are read from SAP and displayed in the dropdown list (Suggested Materials).
If you select a material from the list, the long text for this material is displayed in the material field.