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
jo pricejo price 

Does anyone know can I have a formula field that can also be a pick list?

Can I have a field that is both a picklist and formula?  The picklist values will be 1 to 72.

I need 1 field to be able to used 2 ways. 

1st – Formula to work out the number of months between 2 date fields and return the result as a number, eg Date 1 = 18 August 2021 / Date 2 is 7 February 2021 Result = 8 (representing 8 months).
AND
2nd - also need people to be able to manually select a value between 1 and 72 from the picklist.

Is this possible or do I need 2 separate fields
 
VinayVinay (Salesforce Developers) 
Hi,

Unfortunately, this is not possible you need to have 2 fields with different data types.

Thanks,
Vinay Kumar
jo pricejo price
thank you for your help
Abhishek BansalAbhishek Bansal
Hi Jo,

You can have one field for both the purpose but the data type of the field should be picklist only. At the time when the record is created, you can use workflow rules to update value of this field based on some formulas and later user can edit and change this as well.
In this way you can achieve what you want. Let me know if you need more information on this.

Thanks,
Abhishek Bansal.
laptop rentlaptop rent
Good way of presenting. Every step is briefly introduced the topic & with the help examples it enhance the way of learning. Thanks For Sharing this to us.  Laptop on Rent (http://rentapc.in)