Attributes Supported for Item Rules
All user-defined attributes (extensible flexfields) can be accessed using the syntax [entity name].[attribute group name].[attribute name]. For example: [Item].[Physical Attributes].[Unit Weight]. In addition, rules support access to the predefined attributes listed here, using predefined attribute groups to access the attributes.
Rule Set Context Attributes
This is a special set of attributes that refers to
the context of a rule's execution. Expressions using these attributes
are formed with the prefix Context
in
place of an attribute group name.
Attribute |
Description |
---|---|
BatchID |
Set to Batch ID if running Import. |
BatchName |
Set to Batch Name if running Import. |
ExecutionDate |
Date for which rules are invoked. |
ExecutionDateTime |
Date and Time for which rules are invoked. |
RuleSetVersion |
Currently always set to |
User |
The user whose action triggered the rule. |
Examples:
Context.ExecutionDate >= '7/6/2007'
Context.User == 'USER1'
Change Order Attributes
These attributes represent fields in the header of a change order. They can be used in the expressions of validation rules to validate change orders.
Attribute |
Description |
Example |
---|---|---|
Approval Date |
The approval date of the change order. |
|
Assigned To |
The user the change order is assigned to. |
|
Change ID |
Identifier for the change order. |
|
Change Name |
The editable name of the change order entered when the change order is created. |
|
Change Number |
The fixed identifier of the change order entered when the change order is created. |
|
Created by |
The user who created the change order. |
|
Creation Date |
The date the change order was created. |
|
Description |
The editable description of the change order entered when the change order is created. |
|
Need-by Date |
Need-by Date assigned for the change order. |
|
Organization |
Organization code assigned when the change order was created. |
|
Priority |
The priority assigned to the change order. |
|
Reason |
The reason code assigned to the change order. |
|
Requested By |
The user who requested the change order. |
|
Item Primary Attributes
Attribute group name: Main
For the attributes in this group, see the information about item specifications and attributes in the Using Product Master Data Management guide. This group includes the following attributes:
-
Approval Status
-
Conversions
-
Defaulting Control
-
Formatted Description
-
Item Description
-
Item Status
-
Lifecycle Phase
-
Long Description
-
Negative Deviation Factor
-
Pack Type
-
Positive Deviation Factor
-
Pricing
-
Primary Unit of Measure
-
Secondary Unit of Measure
-
Style Item
-
Tracking Unit of Measure
-
User Item Type
Example:
[Item].[Main].[Primary Unit of Measure] == 'Dozen'
Item Basic Attributes
Attribute group name: Item Basic
For the attributes in this group, see the information about item specifications and attributes in the Using Product Master Data Management guide. This group includes the following attributes:
-
Item
-
Item Class
-
Organization Code
-
Style Item
-
Approval Status
Example:
[Item].[Item Basic].[Approval Status]=='Approved'
Structure Attributes
Attribute group name: Structure Attributes
Structure attributes are accessed only in the context
of the business entity Item, using the StructureAttributes
attribute group name.
For the attributes in this group, see the information about item specifications and attributes in the Using Product Master Data Management guide. This group includes the following attributes:
-
Structure Name
-
Organization Code
-
Common Item Name
-
Common Organization Code
-
Common Structure Name
Example:
[Structure].[Structure Attributes].[Structure Name]=="Primary"
Item Supplier Association Attributes
Attribute group name: Intersection Primary
In the context of the Supplier business entity, you can access item supplier attributes, intersection attributes (Primary indicator and association Status) and other supplier and supplier address related attributes.
The following example checks whether the item supplier association status is Active.
[Supplier].[Intersection Primary].[Status] == 1
Supplier Attributes
Attribute group name: Supplier
This group includes the following attributes:
-
Supplier Name
-
Supplier Number
-
D-U-N-S
-
Taxpayer ID
-
Tax Registration Number
Example:
[Supplier].[Item Supplier Site Organization].[Supplier Name]=='Acme'
Item Relationship Attribute Groups: Cross Reference Attributes
Attribute Group Name: Cross Reference Main
This group includes the following attributes:
-
Type
-
Description
-
Value
-
ApplicableOrganization
Example:
[CrossReference].[Cross Reference Main].[Type]=='Old Item Number'
Item Relationship Attribute Groups: Related Item Attributes
Attribute Group Name: Related Item Main
This group includes the following attributes:
-
Type
-
Description
-
Start Date
-
End Date
-
Reciprocal
-
Planning Enabled
Example:
[RelatedItem].[Related Item Main].[Type]=='Cross-Sell'
WHO Column Attributes
Use these attributes to write rules to govern the updates performed by a specific user, or during a specified time period.
Attribute |
Description |
---|---|
CREATED_BY |
The user who created the data |
LAST_UPDATE_DATE |
The last date that the data was updated This attribute supports these operators: |
LAST_UPDATED_BY |
The user who last updated the data. |
At runtime, the rule validates the user and date reflected in these attributes.
You can use these attributes in assignment and validation
rules for the business entities Item, Revision, and Supplier. For
primary data, these attributes are available in the Insert Attribute dialog under the WHO attribute
group for the available business entities. For the WHO attributes
of item primary attributes (Basic and Main groups), and operational
attribute data, use the syntax [Item].[WHO]
. For the WHO attributes of item revision and supplier primary attributes,
use [Revision].[WHO]
and [Supplier].[WHO]
respectively.
Example:
[Item].[WHO].[LAST_UPDATED_BY] == 'PRODUCTUSER1'
For extensible flexfield attribute groups, the WHO attributes are available under their respective attribute groups and flexfield contexts.
Examples for extensible flexfield attribute groups named Marketing, Color Characteristics, and TAX attributes:
[Item].[Marketing].[LAST_UPDATED_BY]
[Revision].[Color Characteristics].[LAST_UPDATED_BY]
[Supplier].[TAX attributes].[LAST_UPDATED_BY]
In assignment rules, these attributes:
-
Are available only for the business entities Item, Revision, and Supplier
-
Are available only for rules of return type Generic.
-
Are not available as target attributes.
In validation rules, these attributes:
-
Are available only for the business entities Item, Revision, and Supplier
In both assignment and validation rules, you can
use the attribute Context.User
to refer
to the user whose action triggered the rule, whether through the user
interface, during import, or through a service. Example:
context.user == 'ProductEngineer'
Rule Expressions Containing Predefined Attributes
[Item].[Asset Management].[Activity Cause]
[GTIN].[GTIN Main].[Description]
[Change Header].[Change Header Main].[Approval Date]
[Revision].[Item Revision].[Revision Code]
[Supplier].[Item Supplier Site Organization].[Registry ID]
SELECT
*
FROM
(
SELECT
'['
|| prim_groups.ent_disp_name
|| '].['
|| prim_groups.ATTR_GROUP_DISP_NAME
|| '].['
|| prim_attrs.attr_disp_name
|| ']' AS expression
FROM
(
SELECT
'PRIMARY' AS attr_group_type,
ents.display_name AS ent_disp_name,
primAttrs.ATTR_GROUP_NAME AS ATTR_GROUP_NAME,
primAttrs.ATTR_GROUP_DISP_NAME AS ATTR_GROUP_DISP_NAME
FROM
EGP_ITEM_ATTRIBUTES_VL primAttrs,
EGO_RL_PRIM_ATT_DLS levels,
EGO_RL_ENTITIES_VL ents
WHERE
primAttrs.CONTROL_LEVEL IS NULL
AND primAttrs.ATTR_GROUP_NAME != 'MPNAttributes'
AND primAttrs.INTERFACE_TABLE_NAME IS NULL
AND levels.attr_group_name = primAttrs.ATTR_GROUP_NAME
AND ents.data_level_name = levels.data_level
GROUP BY
ents.display_name,
primAttrs.ATTR_GROUP_NAME,
primAttrs.ATTR_GROUP_DISP_NAME
) prim_groups,
(
SELECT
attr.ATTR_NAME,
attr.ATTR_DISP_NAME,
attr.ATTR_GROUP_NAME
FROM
EGP_ITEM_ATTRIBUTES_VL attr
WHERE
attr.CONTROL_LEVEL IS NULL
AND attr.ATTR_GROUP_NAME != 'MPNAttributes'
) prim_attrs
WHERE
prim_attrs.attr_group_name = prim_groups.attr_group_name
UNION
SELECT
'['
|| op_groups.ent_disp_name
|| '].['
|| op_groups.ATTR_GROUP_DISP_NAME
|| '].['
|| op_attrs.attr_disp_name
|| ']' AS expression
FROM
(
SELECT
'EGO_MASTER_ITEMS' AS attr_group_type,
ents.display_name AS ent_disp_name,
ia.ATTR_GROUP_NAME AS ATTR_GROUP_NAME,
ia.ATTR_GROUP_DISP_NAME AS ATTR_GROUP_DISP_NAME
FROM
EGP_ITEM_ATTRIBUTES_VL ia,
EGO_RL_ENTITIES_VL ents
WHERE
( ia.CONTROL_LEVEL = 'M'
OR ia.CONTROL_LEVEL = 'C' )
AND ents.data_level_name = 'EGO_ITEM_DL'
GROUP BY
ents.display_name,
ia.ATTR_GROUP_NAME,
ia.ATTR_GROUP_DISP_NAME
) op_groups,
(
SELECT
attr.ATTR_NAME,
attr.ATTR_DISP_NAME,
attr.attr_group_name
FROM
EGP_ITEM_ATTRIBUTES_VL attr
WHERE
( attr.CONTROL_LEVEL = 'M'
OR attr.CONTROL_LEVEL = 'C' )
) op_attrs
WHERE
op_attrs.attr_group_name = op_groups.attr_group_name
)
ORDER BY
expression
Rule Expressions Containing EFF Attributes
You can use the following SQL query to get a list of rule expressions of EFF attributes for usage in rules.
SELECT
*
FROM
(
SELECT
'['
|| eff_groups.ent_disp_name
|| '].['
|| eff_groups.ATTR_GROUP_DISP_NAME
|| '].['
|| eff_attrs.attr_disp_name
|| ']' AS expression
FROM
(
SELECT
ents.DISPLAY_NAME AS ent_disp_name,
ag.CONTEXT_CODE AS ATTR_GROUP_NAME,
ag.NAME AS ATTR_GROUP_DISP_NAME
FROM
FND_DF_CONTEXTS_VL ag,
FND_EF_CONTEXT_USAGES contextUsages,
EGO_RL_ENTITIES_VL ents
WHERE
ag.APPLICATION_ID = 10010
AND ents.DATA_LEVEL_NAME = contextUsages.FLEXFIELD_USAGE_CODE
AND ag.DESCRIPTIVE_FLEXFIELD_CODE = 'EGO_ITEM_EFF'
AND ag.ENABLED_FLAG = 'Y'
AND ag.LAST_UPDATE_DATE < (
SELECT
DEPLOYMENT_DATE
FROM
FND_DF_FLEXFIELDS_VL
WHERE
DESCRIPTIVE_FLEXFIELD_CODE = 'EGO_ITEM_EFF'
)
AND contextUsages.APPLICATION_ID = 10010
AND contextUsages.DESCRIPTIVE_FLEXFIELD_CODE = 'EGO_ITEM_EFF'
AND contextUsages.CONTEXT_CODE = ag.CONTEXT_CODE
) eff_groups,
(
SELECT
NAME AS ATTR_DISP_NAME,
CONTEXT_CODE AS ATTR_GROUP_NAME
FROM
FND_DF_SEGMENTS_VL
WHERE
APPLICATION_ID = 10010
AND DESCRIPTIVE_FLEXFIELD_CODE = 'EGO_ITEM_EFF'
AND ENABLED_FLAG = 'Y'
AND LAST_UPDATE_DATE < (
SELECT
DEPLOYMENT_DATE
FROM
FND_DF_FLEXFIELDS_VL
WHERE
DESCRIPTIVE_FLEXFIELD_CODE = 'EGO_ITEM_EFF'
)
UNION
SELECT
attr.ATTR_DISP_NAME,
'ORA_EFF_WHO' AS ATTR_GROUP_CODE
FROM
EGP_ITEM_ATTRIBUTES_VL attr,
EGO_RL_PRIM_ATTS PrimAttrs
WHERE
attr.CONTROL_LEVEL IS NULL
AND PrimAttrs.ATTR_GROUP_NAME = attr.ATTR_GROUP_NAME
AND PrimAttrs.ATTR_NAME = attr.ATTR_NAME
AND attr.ATTR_GROUP_NAME = 'ORA_EFF_WHO'
) eff_attrs
WHERE
eff_attrs.attr_group_name = eff_groups.attr_group_name
OR eff_attrs.attr_group_name = 'ORA_EFF_WHO'
)
ORDER BY
expression