Friday, June 5, 2015

SET_ITEM_PROPERTY "enabled" Property Concept

    SET_ITEM_PROPERTY 
"enabled"  Property Concept



In the name of Allah, Most Gracious, Most Merciful
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,
    
          If you want to change all instances of an item in a multi-record block, use "SET_ITEM_ITEM"  built-in function. realizing the business logic behind such a validation  to enable or disable such a text item pro-grammatically will motivate you to search, learn and try to apply the required task by yourself In Shaa Allah successfully. 

    
Key Problem: 

         Many developers encountered problems while setting "SET_ITEM_ITEM"  built-in function with "enabledproperty  Only to either"True" or "False" to a form text item; either it's not working properly or it has no effects on a data block form.


Key Reason:
       
       The input process is really a complex process.
       Now, let's imagine what are the possible functions for a user inputs:
  • Navigation: the user initially starts the input with navigation to the text item. 
  • Insertion: the user is expected to write with the keyboard to input data.
  • Updatingthe user is expected to update the data entered.
  • Deleting:  the user is expected to delete the data entered.
      
       The main problem for implementing this task exists in the developer is Not recognizing the previous component of the input process.


Key Solution:  

       Hence, you should be familiar with all the  four required properties that works in co-ordinate with each together and this will In Shaa Allah guarantee the correct solution of first part of the problem.   

 Focus on Four Properties:
  1.  Enabled.
  2.  Navigable.
  3.  Insert_allowed.
  4.  Update_allowed.
  A simple example for enabling and disabling a form text item:

Disabling a Text Item
SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',enabled,property_false);

SET_ITEM_PROPERTY('
BLOCK_NAME.ITEM_NAME',navigable,property_false);

SET_ITEM_PROPERTY('
BLOCK_NAME.ITEM_NAME',insert_allowed,property_false);

SET_ITEM_PROPERTY('
BLOCK_NAME.ITEM_NAME',update_allowed,property_false);


 Enable a Text Item
SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',enabled,property_true) ;

SET_ITEM_PROPERTY('
BLOCK_NAME.ITEM_NAME',navigable,property_true);

SET_ITEM_PROPERTY('
BLOCK_NAME.ITEM_NAME',insert_allowed,property_true);

SET_ITEM_PROPERTY('
BLOCK_NAME.ITEM_NAME',update_allowed,property_true);




       The second part of the problem is lies in When...?  When to fire the above code ?
After recognizing the business logic of your task, the proper code to implement it, you need to know the proper trigger, that will fire and execute the above code.

           A list of  common triggers used in such actions.   
  • When you run the form: When-New-Form-Instance  Trigger or When-New-Block-Instance Trigger
  • When you execute query:  Post-Query Trigger.
  • When navigate to next record: When-New-Record-Instance Trigger.
  • When you change a specific data value as:
      •  When  you select a value from a drop down list item:                                                When-List-Changed Trigger.
      • When  you select a check box value: 
                                              When-Check-Box-Checked Trigger.
      • When  you select a radio button value: 
                                                When-Radio-Changed Trigger.
      • When  you select a list of value (LOV):
                                                   Key-Next-Item Trigger.
      • When  you press a button: When-Button-Pressed Trigger.

Finally, we have got the most of the common triggers at your request and ready to fire your event.


Hope it Helps…


My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.