2 Replies Latest reply on Aug 7, 2019 12:26 PM by Michael Ferrante-Oracle

    Set Visual Attribute Dynamically With Loop

    Angus123

      Hi

      Forms 10g

       

      I have a table that contains visual form name, label number and attribute details

      e.g

      FORM_NAME LABEL_NO, VA_DETAIL

      Contract, 21, VA_LABEL

      Contract 22, VA_LABEL

      Contract, 23, VA_TEXT

       

      In the Contract form I have a visual attribute called VA_LABEL and text items for item labels

      I want to set the visaul attribute of the labels to the values in the table

      All my labels start with LABEL and then a number

      eg

      LABEL21

       

      Is this code correct and if so, where do I put it in the form

       

      declare

       

      cursor c1 is

        select LABEL_NO, VA_DETAIL

      from   masken_labels_va

          where  msk_app_name = :system.current_form;

       

      begin

       

      FOR mask_label in c1

      LOOP

        set_item_property('LABEL.LABEL'||c1.LABEL_NO, VISUAL_ATTRIBUTE, c1.VA_DETAIL);

      END LOOP;

      end;

       

      Regards

       

      Gus