function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tchang SuTchang Su 

How to do to separate the values of a picklist (Multi select) ?

Dear all,

 

I created a multi select picklist with different countries and I chose for each people I created the countries he works with.

 

In my report, I have this result for example :

FR               2

FR, GB       1

GB              3

GB, USA    1

USA            1

 

I want to count each value and to have just one line for each country :

FR   3

GB   5

USA  2

 

How can I do to separate the picklist values ?

Do you have any suggestion for this pb ?

Thank you.

 

:smileyhappy:

Ram-SFRam-SF

Map<String,Integer> countryCountMap = new map<String,Integer>();

if(countryCountMap.containsKey(CountryName))

countryCountMap .put(CountryName,countryCountMap.get(countryName)+1)

else

countryCountMap .put(CountryName,1)

Tchang SuTchang Su

Thank you for your answer.

But I want to do a report to count the values of my picklist multi select and I don't know how to do this.

Can you explain me ?

Thank you. :smileyhappy: