+ Start a Discussion
InForm AdminInForm Admin 

Dependent picklist (picklist - date)

Apologies, I am new to Inform/Salesforce admin so this could be an easy one.

My organisation has a requirement for four picklists on all client files, corrasponding to four surveys, indicating whether that survey has been completed or not (Yes/No/Unknown). If the survey has been completed, I would like a date field to appear, so the worker can log the date on which the survey has been completed. 

However, it appears that date is not an option as a dependant field. I've had a look around and can't seem to find anyone with this issue, any help appriciated. 
Mia Nyfors  MoyaMia Nyfors Moya
I have a similar case where the yes answer in a picklist should make it possibly to add a date.
Can anybody help with this?
Andrew EchevarriaAndrew Echevarria
Not natively, you won't be able to.

However, a solution would be to create a VF page to then add to the page layout. You can render the date fields based on the picklist's value. You don't need to know Apex, just VisualForce, here is a link to get started:

Here is an example of how I think you could make it work, you'd have to incorporate this into your VF page with your fields.
<apex:actionFunction name="showDateField" reRender="dateBox" />
<apex:inputField value="{!Lead.Survey}" onchange="showDateField()" />

<apex:outputPanel id="dateBox">
<apex:inputField value="{!Lead.SurveyDate}" rendered="{!Lead.Survey == 'Yes'}" />
Mia Nyfors  MoyaMia Nyfors Moya
Thanks a lot for your answer! Have to look into VisualForce, still quite new to Salesforce so haven't had the time to learn that yet.