This discussion is archived
1 Reply Latest reply: Aug 13, 2013 2:07 AM by Su.gi RSS

SET_ITEM_INSTANCE_PROPERTY and SET_ITEM_PROPERTY

Migs_Isip Newbie
Currently Being Moderated

good day,

 

i'm working on a form that has a a text field.

I want it to be disabled by default, then if i click a push button and conditions are met, it would be enabled and the user can input text.

the pseudo-code goes like this:

 

textfield -> disabled

button clicked

{

     if status = 0

          textfield -> disabled

     elsif status = 4

          textfield -> enabled and editable

     elsif status > 4

          textfield -> can only display values

     endif

}

 

any help would be much appreciated. thank you!

  • 1. Re: SET_ITEM_INSTANCE_PROPERTY and SET_ITEM_PROPERTY
    Su.gi Newbie
    Currently Being Moderated


    hi,

    in WHEN-NEW-FORM-INSTANCE and WHEN-BUTTON-PRESSED trigger write the below code

    IF status = 0

    THEN

    SET_ITEM_PROPERTY('Fieldname',ENABLED,PROPERTY_OFF);

    elsif status = 4

    SET_ITEM_PROPERTY('Fieldname',ENABLED,PROPERTY_ON);

    elsif status > 4

    SET_ITEM_PROPERTY('Fieldname',ENABLED,PROPERTY_ON);

    SET_ITEM_PROPERTY('Fieldname',INSERT_ALLOWED,PROPERTY_OFF);

    SET_ITEM_PROPERTY('Fieldname',UPDATE_ALLOWED,PROPERTY_OFF);

    SET_ITEM_PROPERTY('Fieldname',DELETE_ALLOWED,PROPERTY_OFF);

    end if;

     

    hope this will help

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points