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
Ravichandra sindheRavichandra sindhe 

usage of custom metadata settings

HI,

i have below scenerio, need a help on how to achieve this through custom metadata settings

based on a value i select from drop down..i need to match and get corresponding value

example :

drop down has : red,blue,green

when i select Red...i need to get corresponding indicator value such as R.

so for Green ..G...how to achieve this through custom meta data settings..

Please help with sample code

Arunagiri PradeepkumarArunagiri Pradeepkumar
Ravichandra Sindhe - You can create a Custom Metadata type with a 2 fields. One a picklist and another one, a text field. Once we have the fields ready, create records for the Custom Metadata type by selecting Red as picklist value for one of the record and include a comma separated values or single value in the text field. Similary you can create one record for Green too.

I am not sure how you are planning to use it. But be it in Apex or lightning component we can query the complete records and use it.