function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Glenn Nyhan 54Glenn Nyhan 54 

Formula for Picklists

I have a formula that works fine for finding values in a picklist and multiplying those by a ticket price:

VALUE(TEXT(General_Admission_of_Tickets_Ordered__c)) * 90.00

But I need to add one more variable and am having trouble with that. We have a series of events and in some the price of the ticket is different from others. So I need to use this formula and add the specific event name so when the price varies by event name the total will be correct. Can anyone furnish a solution for this? Thanks in advance. 
Best Answer chosen by Glenn Nyhan 54
Sachin P Sam 1Sachin P Sam 1

@Glenn Nyhan 54
Rather than providing the Price as hard  coded, create a formula field that has  the price based on the event.This formula field can be used for calculating total. (In code please add new field by replacing 90).
Regards,
Sachin P Sam

All Answers

Gaurav HandooGaurav Handoo
Hi Glenn

You can add If conditions (or Case Switch) based on Event Name, but that might hit the character limit allowed in a formula field. Instead, would recommend using a Process Builder to calculate the same, you can keep adding your conditions as and when new Event Types comes in your business scenario.

Hope this helps. Please mark as best answer if it does.

Cheers!!

Gaurav
Sachin P Sam 1Sachin P Sam 1

@Glenn Nyhan 54
Rather than providing the Price as hard  coded, create a formula field that has  the price based on the event.This formula field can be used for calculating total. (In code please add new field by replacing 90).
Regards,
Sachin P Sam
This was selected as the best answer
Glenn Nyhan 54Glenn Nyhan 54
Thanks for all the suggestions. Sachin...I took your basic premise, and added a default price field for each price on the form(s), then added this formula and it worked:

GA_Total__c * VALUE(TEXT(General_Admission_of_Tickets_Ordered__c))

Thanks for the help.