Views:

Overview

This article will explain when you would use certain Name and Value fields within a Decision Table. There are two variations on this Name and Value combination. 

  • Option Sets:      {Name} or {Value} 
  • Lookups:           (Name) or (Value)

When used in Conditions

Option Sets

In an Option Set the value is the Integer value that is actually stored behind the scenes e.g. 100000000 while the name is the string value that appears on the Option Set for the end-user. The name shown to the user can be different depending on the language of the user. A user with the language setting of 'English' will see the name in English but a user with a Spanish language setting will see the Spanish name. So we need to be very careful when using the name field when designing business rules as normally we would want the business rule to execute the same independent of language. 

When you are checking the value of an Option Set in a Condition, you would always use the value field as this is the actual value stored in the field. This is also the default that North52 BPA uses when you select option set items from the left-hand Source menu. It also means that the logic will work the same way independent of language. 

  e.g. Account entity 'Industry' field

  • 'industrycode'                       Stores the integer   {Value}
  • 'industrycodename'              Stores the string     {Name}

Lookups

With a Lookup field the value is the Guid of the record being looked up while the name is the name of that record.

When you are checking against the value of a Guid you would use the value field, however you could use the name field if you want to do a string comparison. The string comparison is useful because one of the issues with CRM is that Guids change between CRM systems (e.g. Dev/Test/Production) for lookups so using the name keeps everything consistent. 

 e.g.  Account entity 'Primary Contact ID' field

  • 'primarycontactid'                 Stores the guid    (Value)
  • 'primarycontactidname'        Stores the string  (Name)
 

When used in Actions

With Actions, the value field should always be used when bringing a field into row 2 of a Decision Table.

This would apply to any Action including setting a value into the field or applying a ClientSide function like hiding, disabling or showing the field.

Rule of Thumb

Value should be used in almost all cases unless you are attempting a string compare (e.g. checking if the name of a Contact lookup = 'Patrick McInerney' ) in a Condition.
 

Performance

The Name and Value fields when used correctly can really speed up performance on a CRM system as they can save you performing additional API queries to the CRM system for metadata in the case of option sets and entity queries in the case of lookups.