Walle
Walle

Reputation: 570

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 (c_curs_det) 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
loop
  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?

Upvotes: 2

Views: 6218

Answers (1)

Tony Andrews
Tony Andrews

Reputation: 132570

You would use the COPY procedure:

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

Upvotes: 3

Related Questions