In this example, the Retrieve Record button and the list box are bound to the database (named DataConnection) shown in the Data View palette at the left. The button also has a FormCalc script attached to it to retrieve information based on the part number selected in the List Box field. The retrieved records appear in the ID, PART_NO, UNITPRICE, and DESCRIPTION fields.
2. In the Data View palette, drag the UNIT_PRICE, DESCRIPTION, PART_NO, and ID elements under DataConnection onto the form design. Each node dragged onto the form design creates a bound field.
5. Select the button and, in the Script Editor, select click from the Show list, select FormCalc from the Language list, and select Client from the Run At list.
6. Enter a FormCalc script similar to the following example. The script retrieves the data in the specified records and prints it in the corresponding fields when the user clicks the button.$sourceSet.DataConnection.#command.query.select.nodes.item(0).value = Concat(“Select*from OfficeSupplies Where ID = “, DataListBox1.rawValue,””)