You need to sign in to do that
Don't have an account?

How to display picklist value...
How to display all sub pickllist value ?
I have one field (picklist) as General_Expense__c which has certain list of values like abc, def, ghi etc...
Also have one another field (picklist as well as controlling field is General_Expense__c) which has list of values as a,b,c,d,e,f...
Now whenever I select any field from general expense then its appropriate list of fields should appear like this..
abc --> Selected a
b
c
def --> Selected d
e
f
ghi --> Selected g
h
i
Hi,
You have to create dependant pick lists for achieve this. Try following steps;
Create two pick lists with your values in a particular object
Ex: PickList1 (values: abc,def,ghi)
PickList2 (values:a,b,c,d,e,f,g,h,i)
Click field dependencies at Custom Fields & Relationships which is under your object
Click New
Select PickList1 as Controlling Field
Select PickList2 as Dependent Field
Click Continue
Then you can select your dependant values
Use following code for implement the dependant pick list in VF page
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Chamil's Blog
Salesforce provide this dependent picklist creation.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_dependent_picklists.htm
Not sure if you are talking about visualforce page or native page. If you want dependency on visualforce page then Shashikant has given a very good link. If you are talking about native page then :
Just click on field dependencies in your object > Click New > Select "Controlling Field" - General Expense > Select Dependent Field - Your_Child_Picklist > Continue > Double Click on the values Under the General Expense Field which you want to show > Preview to make sure everything is fine > Save.
Now refresh your native page and check this is default provided by salesforce.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Hiiiii Thnx for the quick response,
But still have one problem that whatever the values in second picklist should be shown as command link not in picklist again...
Means whenever I select any value from picklist1 then appropriate value in picklist2 should be visible in the form of command link or directly text format...
So how to do that...
If you are using older version of Salesforce.com API in VFP then, Change the version of your page inversion settings to the latest 22.0 and try then. If you can see dependent picklist working then we will move to show command links.
Hiiiii, Shashikant,
can you tell me that what the things need to be change in above code that has posted by chamil.
But I need that the entire value of the picklist should be printed in column format & every value of picklist u can show me either commandlink or as text too...
I tried this thing by replacing
<apex:inputField value=......> with
<apex:outputText value=......>
& also tell me that how can I change api version from 21.0 to 22.0.
Regards...