Walle Walle - 1 year ago 107
SQL Question

Set text of text item dynamically from table in oracle forms

I am using Oracle Forms Builder 6i. I have created a table which stores the names of my items in a Form, for example detail50.z1, detail50.z2 and so on. The column name is 'detail'.

Now my question is, In a for loop in 'when_new_record_instance' I want to give those items a new text value. For example

detail50.z1 := 'Value 1'

I have created a procedure where I declared a cursor (
) which fetches the item name from my table, and then in a for loop, I want to set the text to an other value. This is what I tried:

for v_rec in c_curs_det
set_item_property(v_rec.detail, XXX, 'Some value');
end loop;

But I can't find anything that I can put on the 'XXX'. Can someone help me?

Answer Source

You would use the COPY procedure:

for v_rec in c_curs_det
  COPY('Some value', v_rec.detail);
end loop;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download