Defining Attributes

To create an attribute:

  1. Select Manage, and then Attributes.
  2. Click New and enter:
    • Name

    • Attribute Type:

      • Date

      • Date and Time

      • Integer

      • List:

        If you select List, enter a list of valid responses to the question.

      • Multi-Line Text

        The maximum length should be less than 4,000 characters.

        Select Multi-Line Text, then enter the Number of Lines, from 3 to 50 lines. Multi-Line Text determines how many lines of text are visible, without scrolling, on the Actions dialog boxes.

        For Multi-Line text type: Select Include Attachments if you want the custom attribute to include an attachments section on the Actions dialog box.

      • Number:

        If you select Number, select number formatting options

        • For Decimal Places, enter a value for the number of decimal places to display.

        • Select the Thousands Separator option if you want numbers to display a thousands separator (for example, 1,000.00)

        • From the Currency Symbol list, select a currency symbol, for example, Dollars ($).

        • From the Negative Number list, select how to display negative numbers, for example, (123).

        • From the Scale list, select a scale value for numbers, for example, 1000.

      • Text

      • True or False

      • User

      • Yes or No

    • Calculation

      Note:

      This feature is available only in 11.1.2.4.100 (patch 20307212). For information about new features and updating to release 11.1.2.4.100, see My Oracle Support https://support.oracle.com

      Calculated attributes are read-only. Calculations can only be evaluated against Schedules:

      • Schedules: When you are in Task List, Gantt, or BI Dashboard views, you can add any Calculation and the calculation is evaluated, regardless of whether it was explicitly assigned to the task or not.

      • Templates: You cannot add a custom attribute, that has the Calculation option selected, as a column or a filterable attribute.

      Administrators can add attributes to the attributes sections in the Actions dialogs and they will be viewable by workflow users. Administrators can restrict access to certain roles by setting access to Do Not Display. For example for calculated attribute XYZ, an administrator could add Viewer: Do Not Display access to it, so that XYZ wouldn't appear for viewers.

      Any user role can add calculated attributes as columns in views and portlets. They can also be added as filterable attributes in the Filter Panel.

      When you select Calculation, a Calculation definition section is displayed:

      • Calculation Type: The list of values is determined by the attribute type:

        • Assign Value to List—Assign custom values to a List type attribute

        • Assign List To Value—Assign custom list values to the values of a different attribute.

        • Conditional—A conditional calculation (If – Then – Else)

        • Scripted—A free-form scripted calculation. Scripted is available for attributes of type Integer, Multi-line Text, Number, or Text.

        The following table lists the calculation types that each attribute type can use when the Calculation option is chosen:

        Table 3-2 Defining Attributes

        Attribute Type Assign Value to List Conditional Scripted Assign List to Value
        Date        
        Date/Time        
        Integer X X X  
        List   X   X
        Multi-Line Text X X X  
        Number X X X  
        Text X X X  
        True/False   X    
        User        
        Yes/No   X    
      • When you select Scripted Calculation type, to enter a free-form calculation equation, use the Add Attribute and Add Function:

        Add Attribute—Select an attribute and click Add an Attribute to the calculationto insert the attribute into the Calculation Definition box at the location of the cursor. If the cursor is in the middle of a word or attribute, the word/attribute will be replaced in the definition. Any attribute that is added will have brackets {} around the name, according to the scripting format.

      • Add Function—Select a function and click Add an Attribute to the calculation to add the function to the Calculation Definition. The Function is added with placeholders for each parameter.

        For example: Insert the DATE_DIFF function in the calculation definition:

        DATE_DIFF(<Date1>, <Date2>, <Type>)

        Then replace the placeholders with attributes:

        DATE_DIFF( {Start Date}, {End Date}, 'DAYS')

        Other scripted function examples:

        • Add Month: Returns a date offset a specified number of months from the starting date. The date will always fall in the specified month offset. If the starting date has a day value beyond what is in the offset month, the last day of the offset month will be used. For example, EDate (31-Jan-2017, 1) returns (28-Feb-2017). For Months, enter the number of months before or after the start date. A positive value for months yields a future date. A negative value yields a past date.

          EDate(<Start Date>, <Months>, <Length>)

          Example: EDate(DATE(2017, 2, 15) 3)

        • Date: Returns a date value based on specified integer values for the year, month and day. For example, this function creates a value of type Date from the function, so DATE(2018, 5, 31) would convert to May 31st 2018.This can then be used in the Date Difference function, to pull the difference in days between a date, such as an end date, and this specific date.

          DATE(<Year>, <Month>, <Day>)

        • Date Difference: Returns the difference in days, hours minutes, or seconds between two dates. For Date1 and Date 2, the values 'TODAY' and 'NOW' can be used, which denote the current date (with no time component) and date-time, respectively.

          Valid types are DAYS, HOURS, MINUTES, SECONDS.

          DATE_DIFF(<Date1>, <Date2>, <Type>)

          Example: DATE_DIFF('TODAY', {Preparer End Date}, 'DAYS') or DATE_DIFF({Preparer End Date}, 'NOW', 'HOURS')

        • Day: Returns the day value of a date as an integer number

          DAY(<DATE>)

        • Extract Text: Returns the substring within the value, from the positions specified.

          SUBSTRING(<Value>, <Location>, <Length>)

          Example: SUBSTRING( {Name} , 5, 10)

        • If-Then-Else: Allows the user to insert a conditional calculation into the scripted calculation. IF_THEN_ELSE calculations can be nested to support “ELSE IF” type calculations as well.

          IF_THEN_ELSE(<Condition>, <Value1>, <Value2>)

          Example: ,

          IF_THEN_ELSE( ( {Priority} = 'Low'), 'Good'
          IF_THEN_ELSE( ( {Priority} = 'Medium'), 'Better'. 'Best') )
        • Instring: Returns the value of the search.

          INSTRING(<Value1>, <Value to Search>)

          Example: INSTRING({Name}, 'a')

        • Lowercase: Returns the value in lower case

          LOWERCASE(<Value>)

          Example: LOWERCASE ({Task Code})

        • Maximum: Returns the maximum value from a list of attributes. There can be any number of parameters.

          MAX(<Value1>, <Value2>,<ValueN>)

          Example: MAX( {Scripted Substring Loc a}, {Scripted Substring Loc s}, {Scripted Substring Loc t} )

        • Minimum: Returns the minimum value from a list of attributes. There can be any number of parameters.

          MIN (<Value1>, <Value2>, <ValueN>)

          Example: MIN( {Scripted Substring Loc a}, {Scripted Substring Loc s}, {Scripted Substring Loc t} )

        • Month: Returns the month value of a date as an integer number (1-12)

          MONTH (<DATE>)

        • Round: Returns the value rounded to the decimal places specified

          ROUND <Value1>, <Decimal Places>)

          Example: ROUND( ({Scripted Substring Loc t} / 7), '4')

        • Substring:

          SUBSTRING(<Value>, <Location>, <Length>)

          Example: SUBSTRING( {Name}, 4, 10)

        • Text Location: Returns the index of the substring within the value, starting at 1 as the first position.

          INSTRING(<Value>, <Value To Search>)

          Example: INSTRING( UPPERCASE( {Name} ), 'TAX' )

        • Uppercase: Returns the value in upper case.

          UPPERCASE(<Value>)

          Example: UPPERCASE( {Name} )

        • Year: Returns the year value of a date as an integer number.

          YEAR (<DATE>)

  3. The following validation checks are performed when you attempt to save the Scripted Calculation:
    • The Syntax of the Calculation is correct

    • The Attributes and Functions specified in the Calculation exist

    • Parameters to Functions are correct

    • No Circular Loops exist