• Chris High 6
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I feel like, despite searching and eliminating some options, I must be overlooking something that would make this a much cleaner formula in 2023. This State/Province is a picklist field, and if any of the following are selected on the parent record it drives this IF statement. This way of writing it WORKS and passes, but it's so prehistoric. Is there a better way yet?

IF(
AND(
SBQQ__ProductCode__c = '734000',
OR(
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'TX'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'NY'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'VA'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'NC'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'KY'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'AL'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'NJ'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'SC'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'FL'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'GA'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'CA'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'OK'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'MI'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'CO'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'AZ'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'UT')),
Dist_Test_Price__c < 16.50),
"Requires Exception",
"Pass")
I feel like, despite searching and eliminating some options, I must be overlooking something that would make this a much cleaner formula in 2023. This State/Province is a picklist field, and if any of the following are selected on the parent record it drives this IF statement. This way of writing it WORKS and passes, but it's so prehistoric. Is there a better way yet?

IF(
AND(
SBQQ__ProductCode__c = '734000',
OR(
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'TX'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'NY'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'VA'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'NC'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'KY'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'AL'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'NJ'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'SC'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'FL'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'GA'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'CA'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'OK'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'MI'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'CO'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'AZ'),
ISPICKVAL(SBQQ__Quote__r.State_Province__c,'UT')),
Dist_Test_Price__c < 16.50),
"Requires Exception",
"Pass")