1) To reference the values of your items, use this notation:
For example, if your block’s name is ‘block1′, your insert statement should be like this:
<pre>insert into customers (name, address1, address2, city_id)
values (:block1.p2_name,:block1.p2_address1, :block1.p2_address2,:block1.p2_select_city);</pre>
2) Each element in a list has a value and a description. When you reference the item as above, you get the ‘value’ of the element.
There are many ways to populate a list item. One of them is using a record group, like this:
– Create a record group from a query from the Cities table. Ask for the city_id as your first colum:
<pre>select city_id, city
You can create the record group at design time, or at runtime using the create_Group_From_Query built-in.
To populate the list, you can use the Populate_list built-in. For example, if your record group’s name is R:
<pre>if populate_group(‘R’) = 0 then
You could put this code in the when-new-form-instance trigger of the form.