You need to sign in to do that
Don't have an account?

Get Picklist Length?
Hi All,
I would like to query picklist length but I don't find a way to do so. Is it possible using SOQL?
Thanks,
Pooja
I would like to query picklist length but I don't find a way to do so. Is it possible using SOQL?
Thanks,
Pooja
Step1 : - Create a formula field to calculate the length of the picklist text
here is the formula ( return type Number)
Use this value in SOQL
If you are using apex then value of the picklist is string so you can use string.length();
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_string.htm
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya
Do you want to calculate the length of selected picklist value length Or length of picklist values that it contains?
Please let me know.
Thanks,
Jolly Birdi