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
Kevin Kim 9Kevin Kim 9 

How to build a dynamic picklist

I am looking to build a dynamic picklist where users can add a field when they click the "Other" option instead of the admin going back to set the picklist values. 
srlawr uksrlawr uk
You can set a picklist field to be "unrestricted" which means it will accept any String value you wish to shove into it... do this on the Field Creation / Edit page:

User-added image




You (of course) may need to write your own interface / technique to let uses put any value in here - maybe some Visualforce; or if you are loading data via an API, this will then allow any value to be put in.

You can't do this if it is backed by a "Global Picklist Value Set" though, it has to have it's own.

 
Kevin Kim 9Kevin Kim 9
New to using visualforce, what would that look like?