I would like to update a picklist field value with another picklist field value in the workflow action 'Fieldupdate'. Is it possible?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
**The Question has been refined and the original is no longer a correct solution.
The original answer is for setting the value of a Text Field.
Setting the value of a Picklist via an Apex Trigger:
Unfortunately it is not possible to set the value of a Picklist using a Field Update. Instead you can use an Apex Trigger. This guide from Salesforce should start you sown the right path: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_qs_trigger.htm
This is a quick example:
Field1__c - This is used to represent any criteria you might use to set when the field update should happen
Field2__c - This is your picklist
Field3__c - This is the field that contains the value you want to use to set the picklist value
(Original Answer) Setting the value of a Text Field:
It is possible to set the Field to the value of another Field in the Record by using the Formula Editor.
In the 'Specify New Field Value' section when adding a new Field Update you can select 'Use a formula to set the new value'
This will show a text box beneath that you can enter a formula in such as:
If you need help you can click on 'Show Formula Editor'. Above the large text box is an 'Insert Field' button. This will allow you to select the field that you wish to take the value from.
It depends on which way you're going...
From Picklist to Text --- Yes (formula text(PicklistField__c) ) From Text to Picklist --- No From Picklist to Picklist -- No
Whenever the field being updated is a picklist you can only select a specific value in that picklist, or a relative value (Above or below current selection).
To go from Text -> Picklist or Picklist -> Picklist you need to use a trigger.
What are you trying to do? What's your use case for having two fields on the same record with the same value? Instead of using a field update can you use a formula field that displays the value of the picklist?
Yes, it is. When you are creating the Field Update, select "Use a formula to set the new value." You can then choose any value to assign to your field.
Not sure what your requirements are, but could this be done using field dependencies instead of workflow rules? Set up your 'parent' picklist to only allow a certain 'child' picklist value to be selected. Might not work if you arent using standard page layouts or dont have both fields visible on the same page layout, but worth a shot otherwise.