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
ETadminETadmin 

Selected picklist value in a formula field

How can I use a custom formula to get the selected picklist value - i.e. in javascript the sytax would be as follows:
 
theValue = picklist.options[picklist.selectedIndex].value;
 
Thanks!
TCAdminTCAdmin

ET,

if you are wanting to use the value from a picklist in another formula you would need to use ISPICKVAL or the CASE functions.  The CASE function is the smaller of the two type and will work for larger picklists.  The ISPICKVAL normally has to be used with the IF statement which can easily exceed the 1000/4000 character limits.

If you need some specifics then please give me more information on what you want to do with the value in the formula and I'll try and help.

Chris

ETadminETadmin
Thanks for the help. There are a few of these fields I want to create - for example, a product name is a concatenate of the picklist values from 3 fields: product type, product length and payment type. We tried using the ISPICK function but kept getting errors when we tried to validate the statement. Is there a way to do this without having to write out all the cases? We update these picklists all the time and I dont want to have to update all these formula fields each time as well.
TCAdminTCAdmin
ETadmin,
 
Unfortunately there isn't any other way to do this that I know of.  You are stuck using the ISPICKVAL and the CASE functions with the picklist.
 
Chris
ETadminETadmin
I confirmed with support - dynamic fields in formulas are not possible. I'm surprised not to see more noise about this in other forums!
ETadminETadmin