Applying UpdOnlyIfNulls property in Constrain Pick List

To constrain the list of values of a picklist field (Eg: ‘Status’) based on another picklist (Eg: ‘Type’) field value of business component (Eg: ‘Contact’) in multi organization environment.

  • Consider there are two organizations ‘Org1’ and ‘Org2’.
  • Org1 has no constrained on ‘Status’ field in Contact. It is normal pick list based on ‘Picklist Generic’ business component.
  • Org2 needs to have constrained on ‘Status’ field based on values ‘Type1’ or ‘Type2’ of ‘Type’ field in Contact.
  • Create new picklist based on ‘Picklist Hierarchical’ based on LOV Type, same as the existing pick list mapped to ‘Status’ and map it to ‘Status’ field.

Approach:
Normally, whenever a field value have to be constrained on another field, both the fields have to be mapped to hierarchical pick lists and pick maps will be configured so as to constrain the values. Following is alternate approach that can be followed using UpdOnlyIfNulls object definition of Pickmap
 Configuration Steps:

Business Component: Contact
As Mentioned below, create new calculated fields which will have value based on Organization and ‘Type’ field value

Field

Calculated Value

Org Calc

IIf ((OrganizationName() LIKE 'XYZ*'), 'Y', 'N')

Type Calc

IIF([Org Calc] = "Y", IIF([Type] = "Type1", "Type1", "Type2"), "")

 

Map the new hierarchical picklist to ‘Status’ field as follows:
Field:

Field

Picklist

Status

PickList Hierarchical Status

Pickmaps:
Create following pick map for ‘Status’ field

Field

Constrain

Picklist Field

Type Calc

TRUE

Parent

Status

FALSE

Value

Pickmap UpdOnlyIfNulls:
Create following for pickmap ‘Type Calc’ created above

Field

Comments

Type Calc

 

NOTE: ‘UpdOnlyIfNulls’ is to disable the constraint when the constraining field value is null, using a calculated field as the field for the constraint pick map.

The list of values in Data Administration à List of Values setup can be made as below:

LOV_TYPE

LIC Name

Display Value

Parent

Organization

CONSTRAIN_TYPE

Type1

Type1

 

Org2

CONSTRAIN_TYPE

Type2

Type2

 

Org2

LOV_TYPE

LIC Name

Display Value

Parent

Organization

STATUS

STATUS-1

STATUS-1

Type1

Org2

STATUS

STATUS-2

STATUS-2

Type1

Org2

STATUS

STATUS-3

STATUS-3

Type1

Org2

STATUS

STATUS-4

STATUS-4

Type2

Org2

STATUS

STATUS-5

STATUS-5

Type2

Org2

STATUS

STATUS-6

STATUS-6

Type2

Org2

STATUS

STATUS-7

STATUS-7

Org1

STATUS

STATUS-8

STATUS-8

 

Org1

STATUS

STATUS-9

STATUS-9

 

Org1

STATUS

STATUS-10

STATUS-10

 

Org1

Tags