Monday, 5 May 2014

FAQ’S - Event Rules

When performing assignments, business function calls, etc. within the event rule design, the available objects that display are required to be the same type as the left operand selected in an assignment or the data item within the parameter list for a business function, form interconnect, or Table IO mapping.  The event rule editor requires that the data items be the same type.  
Business Functions can be used to convert a field from a math numeric to a string or from a string to a math numeric.  The business functions B0000580 - Convert String to Math Numeric and B0000045 - Math Numeric to String, Convert are examples of available business functions that can be used to convert a value from one data type to another.   



Question 2 - I am trying to retrieve a UDC description using Table I/O and I am not getting the description returned?
User Defined Code (UDC) values and descriptions are stored in the F0005 - User Defined Codes table.  The User Defined Code value is stored in the DRKY column.  This is a ten character column, however the length of the values that are stored in this column are based on the definition of the length of the User Defined Code values for the specified UDC table.  These are defined in the UDC Code Types application.  Frequently these values are less then ten in length and the value is then stored as right justified within the DRKY field in the F0005 table.  This makes Table I/O difficult when attempting to retrieve a UDC description.
There are a couple recommended methods for retrieving a UDC Description.
1.             Whenever possible, use the Associate Description feature available within both Report Design Aid and Form Design Aid.  This feature will automatically return a UDC description for a data item when that data item is associated with a UDC table in the Data Dictionary.
2.             Use a business function to retrieve the UDC description.  There are two business functions available and documented that will return a UDC description.  These are the business functions X0005 Get UDC and B4002070 Get/Update UDC Description. 

The best place to find documentation on the various System Functions available within the event rules is within the PeopleSoft Enterprise One software online helps.  This documentation is located in the online helps under "Tools, Technical and Foundation", "Tools API Reference", "System Functions".

The Media Object system functions allow you to select the appropriate Media Object Data Structure, map the appropriate keys for this data structure and perform a "GetText" function to retrieve a text media object and return the information to a report variable to print on the report.   

Event Rules can be printed to a printer or can be sent to a file.The steps to print event rules are:
·                     Within the Event Rules Design, select the printer icon or the option for File/Print
·                     Select the desired output of either Printer or File.  If selecting File, define the path and file name
·                     Define the desired print scope for the event rules.  Options include printing event rules for the specific event, section or form, or for the entire report or application.
·                      
System functions are available to set and clear errors on a control.  Under the Control system functions the system functions Set Control Error and Clear Control Error are available.  Under the Grid system functions the system functions Set Grid Cell Error and Clear Grid Cell Error are available.  The system functions to set an error require that a Data Dictionary Error Message be sent to the system function in order for an appropriate error message to display within the application.
The SUBSTR (substring) text function is available within the Expression Manager.  This function allows the user to selectively extract any part of a string variable.  The SUBSTR function expects three parameters.  The first parameter is the name of the string variable that you wish to extract characters from.  The second parameter is the starting point within the string for extracting characters.  Keep in mind that the counting of characters in a string begins at 0, not at 1.  The third parameter is the number of characters to extract.
SUBSTR (string, number, number)
For example, to extract the letters "Den" from the string of "Denver", you would use the SUBSTR argument of 
SUBSTR(TestString, 0, 3)
The resulting string value that is extracted is placed into the string that is selected in the "To Object" field of the Expression Manager.

There are numerous Date Business Functions available within the PeopleSoft EnterpriseOne software that can be used to convert dates into a JDE Julian Date Format.  Some of the available functions include B0800013 - Convert String to Date, B41B0470 - Format Date from DMY, B910001 - Convert Julian Date to JDE Date and B9800210 - Convert Julian to Date.  
The document How to Use Date Business Functions describes many of these available functions and includes information on their required parameters and resulting output.  See the Related Documents section for information on this document.

If you associate an existing form (Form Design Aid) or section (Report Design Aid) with event rules to a new business view, all existing event rules that reference Business View fields will become disconnected.  This is true even if the new business view uses the same tables and fields as the previously selected business view.  You will be required to reconnect any existing event rules that reference business view fields in order to correlate these lines of event rules to the new business view fields.


There is a business function available - B8000002 - Delete All Rows from Table that can be used to delete all the rows in a table.  This business function must first be proceeded by the business function B8000007 in order to pass the appropriate environment handle.  This business function will delete all records from a table.  The table object name is passed to the business function as a parameter. 

No comments:

Post a Comment