Item properties driven by table 6i [message #84954] |
Fri, 14 May 2004 11:12 |
Rick
Messages: 49 Registered: March 2000
|
Member |
|
|
I have a form that performs product configurations and based on the product selected I set item properties accordingly(visible/enable). I do this by having a table that indicates which options are available with particular products along with the forms field name that is associated with that option.
If the item is not available for that product I hide the field on the form which works fine, my issue is I want to set the price field value to zero if it is hidden. Thats where I am having a mental block. I thought I could do it thru the cursor value since in this case is the v_price_name (which is the field name on the form)
I thought I could do the following
cr_get_options_all.v_price_name := 0;
which would set the value on the form to zero but it sets
cr_get_options_all.v_price_name variable to zero and not the field on the form.
Any ideas?
PROCEDURE get_options_control IS
cursor c_get_options_all is
select series,wrk_option,status,v_price_name,v_tsp_name,v_weight_name
from cei_mseries_sales_opt_cntrl
where series = :pwworksheet_mseries.wrk_series
and location = :pwworksheet_mseries.wrk_location
and mount = :pwworksheet_mseries.wrk_mount;
cr_get_options_all c_get_options_all%rowtype ;
begin
<<option_list>>
for cr_get_options_all in c_get_options_all loop
if cr_get_options_all.status = 'A' then
set_item_property(cr_get_options_all.wrk_option,VISIBLE,PROPERTY_TRUE);
set_item_property(cr_get_options_all.wrk_option,ENABLED,PROPERTY_TRUE);
set_item_property(cr_get_options_all.v_price_name,VISIBLE,PROPERTY_TRUE);
set_item_property(cr_get_options_all.v_price_name,ENABLED,PROPERTY_TRUE);
else
-- cr_get_options_all.v_price_name := 0;
-- cr_get_options_all.v_tsp_name := 0;
-- cr_get_options_all.v_weight_name := 0;
set_item_property(cr_get_options_all.wrk_option,VISIBLE,PROPERTY_FALSE);
set_item_property(cr_get_options_all.wrk_option,ENABLED,PROPERTY_FALSE);
set_item_property(cr_get_options_all.v_price_name,VISIBLE,PROPERTY_FALSE);
set_item_property(cr_get_options_all.v_price_name,ENABLED,PROPERTY_FALSE);
end if;
end loop option_list ;
END;
|
|
|