You need to sign in to do that
Don't have an account?
LeeC
Picklist order
Hello all,
Is it possible to have a picklist with say A, B, C, D values. The first time a user edits the record the picklist displays value A & B, If the user changes the value to B and edits the record they can now see B, C. Again once the user edits the record and changes the value to C, they can now see C and D.......
Does anyone know if this is possible and how I would go about setting this up?
Thanks,
Lee
I want to make it so the use has to follow an order. i.e. A -> B -> C -> D. There would be no reason for the user to ever need to go back to a previous value.
Unless he saves by mistake.
You can't really hide "old" picklist items, unless you want to do lots of machinations with record types (which will get messy quickly), but you can make a validation rule that prevents the user from going back. That's probably your best bet. Or you can write a Visualforce page with a picklist that you fill with values as you see fit -- then you can do whatever you want.
How would I create the validation rule which would stop the user going back? could you give me an example please
Thanks,
Lee
It's not short and it gets bigger depending on how big your picklist is. If you name things in the picklist strategically, though, it gets easier. Let's say your picklist is a status picklist, and you name its values like:
01 - Prospecting
02 - Qualified
03 - Negotiating
04 - Closed
Then you can make a fairly simple validation rule like
VALUE (LEFT (TEXT( PRIORVALUE (P1__c) ), 2 ) ) < VALUE (LEFT (TEXT( P1__c), 2 ) )
which compares the value of the number on the left side to the formerly selected value of that number.
Thank alot for that. I just have one question though. what happens if the user was on 03 - Negotiating, then they try and save the value as 01 - Prospecting. This will allow them to save the record as the previous value would have been 02 - Qualified? Will it only check againt the prior value not all prior values?
hopefully that makes sense