+ Start a Discussion
David Moore 17David Moore 17 

Create Datefiled which populates based on picklist

Hi All, 

I have new date/time field (datefield1)
I have picklist field (values = support and service)
I have existing date field called stampfield

Scenario is:
when picklist value 'support' is selected: my new date filed should calulate stampied time + 1 hour

when picklust calue 'service' is selected: my new date field should calculate stamped time filed +24 hours

How do I acheive this? Please suggest
PriyaPriya (Salesforce Developers) 
Hi David,

The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.

David Moore 17David Moore 17
? I do not understand your question
PriyaPriya (Salesforce Developers) 

Hi David,

I mean to say that, have you tried doing the above requirement ? Have you written any formula or code? what is the error have you faced in your formula or code? 

So that we can work on the error you have faced to fix it. Complete implementation will be difficult to provide here.

Hope you get it.


So basically this? 
DateTimeField + 

CASE( PicklistField,
'Support', ( 1 / 24 ),
'Service', 1,
0 )

( 1 / 24 ) = 1 hour
1 = 1 Day / 24 Hours