1

I have two picklist fields.

picklist1:

  • factory
  • warehouse
  • RS
  • Retail

picklist2:

  • factory Address
  • warehouse Address

If RS/retails is selected in picklist1 then no dropdown in picklist2 it should be free text field.

3
  • 1
    You can make your picklist not restricting values. But you will need to implement this logic in a custom visualforce page. Mar 22, 2017 at 9:27
  • i am new to SFDC Could anyone please share your Coding to achieve this.
    – Arun
    Mar 22, 2017 at 10:15
  • I would not approach this using unrestricted picklist values. Custom Visualforce page with some JavaScript to show/hide picklist2 depending on picklist1 choice. New custom field "Other" to store your text after RS/Retail chosen. Control "Other" visibility with JavaScript too.
    – TSmith
    Mar 22, 2017 at 10:18

2 Answers 2

1

If I will implement it, I will create dependent picklists. The values factory Address and warehouse address will be dependent of factory and warehouse. The second picklist must no be mandatory. No value will be dependent of RS or Retail. Also, I will create a text field that I will validate when the RS or Retail will be selected. If I need the factory and warehouse in the same text field, I could create a workflow or a Process flow to populate the same text field.

0

If you'd like to keep it simple, you could create a third field of type text (text3), then either:

  • Use dynamic forms to conditionally hide and display the second (picklist2) and third (text3) fields, depending on the value selected in the first field (picklist1). Note that currently, this will only work if these fields are on custom objects, because dynamic forms are not yet available on standard ones.
  • Create a validation rule to ensure that the appropriate field (picklist2 or text3) is populated depending on the value selected in the first field (picklist1).

Neither of these approaches require code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.