Set_Item_Property

Hello

I have three fields say comm_type,C_PHONE_NUMBER and C_EMAIL_ADDRESS.

based on the value in the comm_type field that I need to activate either C_PHONE_NUMBER or C_EMAIL_ADDRESS.

the possible values for the comm_type field are the communications and Email

So I used the following code on the trigger of A POST_TEXT_ITEM field.

If: mutl_mul_con_block.comm_type = 'TeleCommunications' then

Set_Item_Property('MUTL_MUL_CON_BLOCK.) C_PHONE_NUMBER', ENABLED, PROPERTY_TRUE);

Set_Item_Property('MUTL_MUL_CON_BLOCK.) C_EMAIL_ADDRESS, ACTIVE, PROPERTY_FALSE);

on the other

Set_Item_Property('MUTL_MUL_CON_BLOCK.) C_PHONE_NUMBER', ENABLED, PROPERTY_FALSE);

Set_Item_Property('MUTL_MUL_CON_BLOCK.) C_EMAIL_ADDRESS, ACTIVE, PROPERTY_TRUE);

end if;

This code partially works very well.

For the following sceanrio his does not.

I chose telecommunications on the comm_type domain and now phone_number field is activated and field email_address is disabled.

now, once more I changed the value in the comm_type e-mail field now both the phone_number and EMail_address fields are disabled

but I want email_address field is activated.

Any help would be much appreciated.

Kind regards

Kumar.

Dear Kumar,

Are you sure that both filed are disabled? or fields navigable E-mail is fake? When we activation of an element, set the NAVIGABLE, the INSERT_ALLOWED, the UPDATE_ALLOWED true also! So change the code

if :mutl_mul_con_block.comm_type='TeleCommunications' then
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_PHONE_NUMBER', ENABLED, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_PHONE_NUMBER', NAVIGABLE, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_PHONE_NUMBER', INSERT_ALLOWED, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_PHONE_NUMBER', UPDATE_ALLOWED, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_EMAIL_ADDRESS', ENABLED, PROPERTY_FALSE);
else
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_PHONE_NUMBER', ENABLED, PROPERTY_FALSE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_EMAIL_ADDRESS', ENABLED, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_EMAIL_ADDRESS', NAVIGABLE, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_EMAIL_ADDRESS', INSERT_ALLOWED, PROPERTY_TRUE);
  Set_Item_Property('MUTL_MUL_CON_BLOCK.C_EMAIL_ADDRESS', UPDATE_ALLOWED, PROPERTY_TRUE);
end if;

Manu.

Tags: Oracle Development

Similar Questions

  • SET_ITEM_PROPERTY to use for only a few records.

    Hi guys,.

    I use a loop to fill in values of rows bulk BLK_SEL_ASSESSORS.

    Based on the State of I need to enable or disable integration in the field of the EVALUATOR.

    Here is my part of the code

    FOR i IN c_task
    LOOP
    ....
    ...
    IF UPPER(i.taskstatus) = 'COMPLETED' THEN
                        SET_ITEM_PROPERTY('BLK_SEL_ASSESSORS.ASSESSOR',INSERT_ALLOWED,PROPERTY_FALSE);
          ELSE
                        SET_ITEM_PROPERTY('BLK_SEL_ASSESSORS.ASSESSOR',INSERT_ALLOWED,PROPERTY_TRUE);
    END IF;
    NEXT_RECORD;
    END LOOP;
    
    

    But I noticed that the line

    SET_ITEM_PROPERTY('BLK_SEL_ASSESSORS.) THE ASSESSOR ', INSERT_ALLOWED, PROPERTY_TRUE);

    The effect on all lines in the block.

    All I want is the field of the APPRAISER must be enabled to insert rows where the State is not complete and must be disabled for insertion when the State is completed.

    Please help me.

    Hello

    Hi guys,.

    I use a loop to fill in values of rows bulk BLK_SEL_ASSESSORS.

    That I understood, your insertion with the loop data. Right? If so, what new record?

    If so, remove your SET_ITEM_PROPERTY of the loop.

    Try the trigger once - new - Record - instance at the block level and write

    IF UPPER(i.taskstatus) = 'COMPLETED' THEN
                       SET_ITEM_INSTANCE_PROPERTY('BLK_SEL_ASSESSORS.ASSESSOR',CURRENT_RECORD,INSERT_ALLOWED,PROPERTY_FALSE);
          ELSE
                      SET_ITEM_INSTANCE_PROPERTY('BLK_SEL_ASSESSORS.ASSESSOR',CURRENT_RECORD,INSERT_ALLOWED,PROPERTY_TRUE);
    END IF;
    

    Hope this helps

    Hamid

  • set_item_property changing the text, but how to return the original value

    Hi all
    I use Oracle Forms Builder 10 gr 2 / I have the following problem: in a button I trigger when it is pressed. And then I change a few elements prompt text. But my problem is how to return the original prompt text. A kind of refresh or clear?


    Here is a piece of code that modifies the prompt text:
    set_item_property('XXBG_CE_STATEMENT_LINES_NEW.AGENT_NO', PROMPT_TEXT, get_item_property('XXBG_CE_STATEMENT_LINES_NEW.AGENT_NO', prompt_text) || '*');
    Thanks in advance,
    Bahchevanov.

    This is not tested, but it's something like this:

    declare
       v_item  varchar2(200);
    begin
       v_item := get_block_property('block',first_item);
       loop
          exit when v_item = 'block.'||null;
          set_item_property(...);
          v_item := 'block.'||get_item_property(v_item,nextitem );
       end loop;
    end;
    
  • set_item_property does not take effect immediately

    Hi all
    I use oracle forms 10 g 2. I have a CHANGE after tripping on a text field and under certain conditions, I want to make a button in the same block to be visible. Initially, the visibility of the button is set to 'NO '. So this is my code in the trigger after CHANGE:
    begin
              if :XXBG_CE_STATEMENT_LINES_NEW.DOC_TYPE = 'Invoice'   
                  then
                     set_item_property('XXBG_CE_STATEMENT_LINES_NEW.INV_DET_BTN',VISIBLE,PROPERTY_TRUE);
                     set_item_property('XXBG_CE_STATEMENT_LINES_NEW.INV_DET_BTN',ENABLED,PROPERTY_TRUE);
              else
                    set_item_property('XXBG_CE_STATEMENT_LINES_NEW.INV_DET_BTN',VISIBLE,PROPERTY_FALSE);
                    set_item_property('XXBG_CE_STATEMENT_LINES_NEW.INV_DET_BTN',ENABLED,PROPERTY_FALSE);
              end if;
    end;
    The 'DOC_TYPE' field is populated through LoV. When I choose "Invoice" button for this field does not appear... I have to open a LoV randomly and then the button appears... Any ideas?



    Thanks in advance,
    Bahchevanov.

    You can try when-validate-item trigger instead of change after and use the same code.

    Hope this helps

  • Doubt with set_item_property

    Hi all
    I am using set_item_property in when a validation element trigger, but whenever I'm writing the code below, I get an error of too many statements of set_item_property corresponds to this call

    Can someone please guide me how to overcome the error
    BEGIN
    
    IF :RHCCUSTDET.range_type = 'Bill To'
         THEN 
         SET_ITEM_PROPERTY(:RHCCUSTDET.range_from,LOV_NAME,'BILL_FROM_LOV');
         
    ELSE     
         SET_ITEM_PROPERTY(:RHCCUSTDET.range_from,LOV_NAME,'DELIVERY_FROM_LOV');
    END IF;
    END;     
    BTW, my version of the form builder is 10.1.2.0.2

    Any help is appreciated,

    Thanks in advance!

    Published by: sand on 27 January 2012 10:16

    Sandy wrote:
    Hi all

    BEGIN
    
    IF :RHCCUSTDET.range_type = 'Bill To'
         THEN
         SET_ITEM_PROPERTY(:RHCCUSTDET.range_from,LOV_NAME,'BILL_FROM_LOV');
    
    ELSE
         SET_ITEM_PROPERTY(:RHCCUSTDET.range_from,LOV_NAME,'DELIVERY_FROM_LOV');
    END IF;
    END;     
    

    I didn't test this. But it seems to work... Try

    BEGIN
    
    IF :RHCCUSTDET.range_type = 'Bill To'
         THEN
         SET_ITEM_PROPERTY('RHCCUSTDET.range_from',LOV_NAME,'BILL_FROM_LOV');
    
    ELSE
         SET_ITEM_PROPERTY('RHCCUSTDET.range_from',LOV_NAME,'DELIVERY_FROM_LOV');
    END IF;
    END;
    

    Hope this will help you.

    If someone useful or appropriate, please mark accordingly.

  • SET_ITEM_PROPERTY does not

    Forms [32 bit] Version 10.1.2.0.2 (Production)

    I have an Add button. ON_CLICK_TRIGGER pretty much creates a registration, duplicates of previous records, changes some fields; but I want MEMBERID to remain the same. So to prevent users from accidentally changing the memberid, I want to turn it off / gray out / whether, as long as users cannot change.

    I thought that I can use
    GO_BLOCK('ABC');
    CREATE_RECORD;
    DUPLICATE_RECORD;
    SET_ITEM_PROPERTY('ABC.MEMBERID',ENABLED,PROPERTY_FALSE);
    ...
    but it does not work. Why?

    Edit:

    I also tried the following without success
    declare
     v_item Item;
    begin
    GO_BLOCK('ABC');
    CREATE_RECORD;
    DUPLICATE_RECORD;
    v_item:= find_item('ABC.MEMBERID');
    set_item_property (v_item,ENABLED,PROPERTY_FALSE);
    ...
    Published by: apex_disco on December 1st, 2011 12:55

    If the focus is on ABC. MEMBER ID, you can set Enabled to False. In other words, if the current element. Go_Item to another field first.

    But I think I'd try setting Update_Allowed false instead.

  • set_item_property does not work

    Hello.
    I have the scenario,

    If the field 'x' = 1 then
    set_item_property(y,required,property_true)
    on the other
    set_item_property(y,required,property_false)

    but it works very well only as a first step,
    for example, I put 1 then block forms filed there, I put 2 release forms the fied, but if I put 1 new no longer works...
    What lack us...
    TKS.

    Hello

    but it works very well only as a first step,
    for example, I put 1 then block forms filed there, I put 2 release forms the fied, but if I put 1 new no longer works...

    What do you mean that it no longer works? How you came to know this?

    A guess maybe you need to validate that the point manually as below...

     if the field "x" = 1 then
       set_item_property(y,required,property_true)
       :field_y:=:field_y;
     else
       set_item_property(y,required,property_false)
     end if;
    

    -Clément

  • set_item_property in the menu drop-down

    Is it possible to use set_item_property to change something on a block in a menu element drop-down? I'm going to guess 'no', but it would be awfully convenient for me if there was a way around it.

    use

    SET_ITEM_PROPERTY('BLOCK.ITEM', PROPERTY, VALUE);
    

    To access the Menu items:

    DECLARE
      myVar VARCHAR2(2000);
    BEGIN
      -- Read
      myVar:=NAME_IN('BLOCK.iTEM');
      -- Write
      COPY(myVar, 'BLOCK.ITEM');
    END;
    

    Published by: Andreas Weiden on 24.11.2008 08:11

  • The turning point of the value on and off under condition

    Oracle Forms 10G

    Hi gurus

    I'm quite new to forms, I have 1 requirement, I have 2 points (dot, dot XY) on the forms and the point x can be set to LOV or the user can also enter the value without LOV.

    The condition is that if the point x has received value = '03' part must be active, editable, and if the scope of the element X is set to any other value (or null), the item field there should be delivered to null, made inactive, cannot be changed.

    I'm really grateful if someone to guide me. Thank you

    Concerning

    Muzz


    Dear MUZZ

    in forms, if you disable or invisible something, its NAVIGABLE, INSERT_ALLOWED, UPDATE_ALLOWED properties were also defined as FALSE. So if you allow an element, you must set the other properties to True.

    So, your code will be

    IF :. = '03' THEN
      SET_ITEM_PROPERTY('.', ENABLED, PROPERTY_TRUE);
      SET_ITEM_PROPERTY('.', NAVIGABLE, PROPERTY_TRUE);
      SET_ITEM_PROPERTY('.', INSERT_ALLOWED, PROPERTY_TRUE);
      SET_ITEM_PROPERTY('.', UPDATE_ALLOWED, PROPERTY_TRUE);
      ELSE
      :. := NULL;
      SET_ITEM_PROPERTY('.', ENABLED, PROPERTY_FALSE);
      END IF;
    

    Manu.

  • What is "auto"?

    Hello

    I created a new for and wrote

    message (auto);

    and it shows (62).

    I have no variables or functions named 'auto '.

    You can try it in a database.

    What is "auto"?

    Hi Salem wrote:

    What is built in the property?

    -- setting the enabled property of an item using the set_item_property built in
    set_item_property('your_block.your_item', enabled, property_true);
    -- outputting the enabled property in general
    message(enabled);
    

    This will work as well; It will display a numerical value. As already said - built-ins of forms (for example set_item_property) properties are constant numbers. That's why it works "on each database" - and even when you are disconnected, as the + auto + constant (and the constant enabled as well) are declared in the forms, not in the data dictionary or in a stored procedure. You can switch the active (or constant to be exact) property to a built in (or PL/SQL program unit) you like. Maybe he'll proceed as planned, maybe it does not raise an error, or maybe he won't do anything.

    It is documented that integrated is able to accept the + enabled property + (set_item_property or get_item_property for example). It should be documented that built-ins accept the + auto + goods as well. I did not throw a look at the documentation, but if you do not find it could be a property of a built-in obsolete (such as get_file_name) which is simply there for backward compatibility. Just a guess.

    see you soon

  • Change the background color of the text box for the required field

    Guys,

    I want to change the background color of textfield required when the user is in data entry Mode. And when the record is validated successfully the background color should be back to the default.

    That's what I've done so far.

    Created a Visual attribute that contains the background color.

    In the record of the creation of the data block added the code below.

    IF: SYSTEM. BLOCK_STATUS = 'NEW' THEN

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) BATCH ', VISUAL_ATTRIBUTE, 'ENABLE_COLOR');

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) VENDOR', VISUAL_ATTRIBUTE, 'ENABLE_COLOR');

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) AMOUNT ', VISUAL_ATTRIBUTE, 'ENABLE_COLOR');

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) ACCOUNTING_DATE', VISUAL_ATTRIBUTE, 'ENABLE_COLOR');

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) INVOICE_DATE', VISUAL_ATTRIBUTE, 'ENABLE_COLOR');

    ON THE OTHER

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) BATCH ', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) VENDOR', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) AMOUNT ', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) ACCOUNTING_DATE', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) INVOICE_DATE', VISUAL_ATTRIBUTE, ");

    END IF;


    And in the key to commit the following code is added

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) BATCH ', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) VENDOR', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) AMOUNT ', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) ACCOUNTING_DATE', VISUAL_ATTRIBUTE, ");

    SET_ITEM_PROPERTY ('MASTER_APM_INVOICE.) INVOICE_DATE', VISUAL_ATTRIBUTE, ");



    The problem is, form opens in the mode of data entry, so mandatory fields have changed background color, and mode query and run the query, background colors are changed in accordance with a.


    Any help how to solve this problem?


    Also, what tag should I use to highlight the code in my post, the FAQ forum says its {code: sql} but his does not and the code is not formatted.



    Concerning



    Dear Faisal Niazi,

    Write code to set the normal Visual attribute in the trigger WE POPULATE DETAILS or after REQUEST of the block trigger.

    Manu.

  • Texteelement read only after it retrieve records

    Hi I have situation where I lov which record recover and fill the folder to other fields I have what it takes to define this textitem to read after it retrieve records the user cannot go back and enter the value after recover data. so the situation is using pass code type textitem example 009 and tab after that the user cannot go back and type again the textitem should read only am in the form of oracle 11 g

    Hello

    If this element of text attached to the lov is a single block record, use the SET_ITEM_PROPERTY procedure with the UPDATE_ALLOWED = property_false property.

    If it is a multi-record block, use the SET_ITEM_INSTANCE_PROPERTY procedure with the UPDATE_ALLOWED = property_false property.

    So, the logic might be:

    IF: blk_name.textitem is not null THEN - assuming a valid value entered via lov (you can check this if you set the "Post to list" item text to true).

    SET_ITEM_xxxxxxx ('blk_name.textitem', UPDATE-ADMITTED, PROPERTY_FALSE);

    END IF;

    Greetings,

    SIM

  • read only lov

    Hi I have lov in my textitem property of textitem update = no = no inclusion when I try from the lov I get the error field is protected against the update if I change ownership Yes use the user can update the value in the Texteelement lov which i don't that how can I work around this am in the form of oracle 11 g

    Alex,

    Write code in the trigger VAL-LIST-KEY of the element.

    SET_ITEM_PROPERTY ('.', INSERT_ALLOWED, PROPERTY_TRUE);

    LIST_VALUES;

    SET_ITEM_PROPERTY ('.', INSERT_ALLOWED, PROPERTY_FALSE);

    Kind regards

    Manu.

  • Toggling text element based on the selection of a list item

    Hello friends,

    I have a header data block where I have a field to not enter the name of book and a REGD Item list that displays 'Yes' and ' ' and a text REG_NO element.

    When the user selects 'Yes', the text REG_NO element must be enabled so that the user can enter the number of the book.

    By choosing 'No', the REG_NO element must be disabled.

    I have included a trigger WHEN-LIST-CHANGED in the list REGD item.

    I added the following code in the trigger above:

    --=======================================

    BEGIN

    IF: HEADER. REGD = ' don't

    THEN

    SET_ITEM_PROPERTY('HEADER.) REG_NO', ENABLED, PROPERTY_FALSE);

    ON THE OTHER

    SET_ITEM_PROPERTY('HEADER.) REG_NO', ENABLED, PROPERTY_TRUE);

    END IF;

    END;

    --=======================================

    However, when the form is opened, the text REG_NO element is enabled.

    When the user chooses the 'no' in the list item REGD, then the text REG_NO element is disabled as expected.

    However, when you choose 'Yes' in the item list REGD, the text REG_NO element does not get activated.

    Can someone let me know how to activate the text element.

    Concerning

    Hawker

    When you disable an item, NAVIGALE, INSERT_ALLOWED, and UPDATE_ALLOWED properties are also set to False, then you will need to reactivate their when you reactivate an item.

  • Showing Popup advances in oracle forms 6i

    Hi gurus,

    I develop a form (6i) in which I have a requirement that

    I'll call a stored procedure in my form, procedure will return a pl/sql output data collection and collection filled in my block (block no DB). sometimes process will consume time for data extraction.

    I have a requirement to display a progress popup, before calling the procedure and once the procedure return data, I need the popup closes automatically. pop-up message to change according to the input passed to the procedure.


    To do this, I created a new dialogue window, in the Web of dialogue, block with the point of a text whose width and height is 0, I dynamically change the prompt of the text element to display the message. now the problem is if have a batim message before the go_item of the progress window, window appeared, otherwise it will not.


    Message "(veuillez prendre note de paquet Explosion processus prendra un certain temps');" (if I remove this buildin message, it does not appear under the window)

    Set_Item_Property('BLK_PROGRESS.) TEXT_BOILER_PLATE ', Prompt_Text,' Please wait a few seconds, package Explosion asks pallet / box ' |: Blk_View_Rma_Serial.Text_Package_Num | "is in progress now..." ») ;

    Go_Item('BLK_PROGRESS.) TEXT_BOILER_PLATE');

    Go_Block ('BLK_PROGRESS');

    Show_View ('CANVAS_PROGRESS');

    fnd_message. Set_string ('package is complete Explosion');

    Fnd_message. Hint;

    I change all the possible sequence of the go_item, go_block, display as well., but same result. If I add fnd_message buildin instead of message as it leads to the same result, poster not the window message.

    Please help me solve this problem.

    Thank you

    See the article from the Blog of Francois Degrelle: forms: a progress bar to track the execution of the stored procedure.

    Craig...

Maybe you are looking for