• Mathieu Guay-Gallant
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

I am trying to build a formula field (number) to track to number of opportunities of a certain type that contain a certain product. I have a field called "Type of Sale" (picklist) that we use to track the type of sales we make (Serialization, Serialization and aggregation, Inspection, etc). I want to create a field that will look at that field and if it has a certain value (Serialization OR Serialization and aggregation) AND a certain product (BottleTracker OR CartonTracker OR Flying CartonTracker OR Manual Print Station OR PackStation CAP OR PacStation SAP OR PackStation SAP OR LabelTracker OR BunderTracker) is attached to the opportunity, the field value will be 1. If not, it will be 0. I will then use that field to report of the % of Serialization AND Serialization and aggregation sales that include the aforementioned products.

I have came up with the following formula:

IF(AND(OR(Type_of_Sale__c="Serialization", Type_of_Sale__C="Serialization and aggreation"), (OR(PricebookEntry.Product2.Name="BottleTracker", PricebookEntry.Product2.Name="CartonTracker", PricebookEntry.Product2.Name="Manual Print Station", PricebookEntry.Product2.Name="PackStation CAP", PricebookEntry.Product2.Name="PackStation FMP", PricebookEntry.Product2.Name="PackStation SAP", PricebookEntry.Product2.Name="BundleTracker", PricebookEntry.Product2.Name="LabelTracker")), 1, 0))

When I use the "check syntax" button, the syntax is fine, but it tells me that "Picklist fields are only supported in certain functions".

How should I proceed to achieve my goal? I have absolutely no experience with advanced formulas so please dumb it down to my level.
Hi,

I am trying to build a formula field (number) to track to number of opportunities of a certain type that contain a certain product. I have a field called "Type of Sale" (picklist) that we use to track the type of sales we make (Serialization, Serialization and aggregation, Inspection, etc). I want to create a field that will look at that field and if it has a certain value (Serialization OR Serialization and aggregation) AND a certain product (BottleTracker OR CartonTracker OR Flying CartonTracker OR Manual Print Station OR PackStation CAP OR PacStation SAP OR PackStation SAP OR LabelTracker OR BunderTracker) is attached to the opportunity, the field value will be 1. If not, it will be 0. I will then use that field to report of the % of Serialization AND Serialization and aggregation sales that include the aforementioned products.

I have came up with the following formula:

IF(AND(OR(Type_of_Sale__c="Serialization", Type_of_Sale__C="Serialization and aggreation"), (OR(PricebookEntry.Product2.Name="BottleTracker", PricebookEntry.Product2.Name="CartonTracker", PricebookEntry.Product2.Name="Manual Print Station", PricebookEntry.Product2.Name="PackStation CAP", PricebookEntry.Product2.Name="PackStation FMP", PricebookEntry.Product2.Name="PackStation SAP", PricebookEntry.Product2.Name="BundleTracker", PricebookEntry.Product2.Name="LabelTracker")), 1, 0))

When I use the "check syntax" button, the syntax is fine, but it tells me that "Picklist fields are only supported in certain functions".

How should I proceed to achieve my goal? I have absolutely no experience with advanced formulas so please dumb it down to my level.