Running a query - host variables
In
Running a query, you ran the query before the window opened. Because this query uses a host variable, you can't run the query before the window opens, because the variable would be nil. To run a query with a host variable, do the following:
1. Because the query expects a department number as input, connect the object attribute of the Department number text part to the dept attribute of the query.
2. Delete the currentRow part and the aboutToOpenWidget-executeQuery connection.
3. Add a new Find push button and connect its clicked event to the executeQuery action of the multi-row query part.
Your Composition Editor will look like this:
4. Test your new visual part. Try typing the department number 20 and selecting the Find push button. Other department numbers you can try are 10, 15, 38, 42, 51, 66, and 84.
Last modified date: 06/01/2018