iDictionary to List
I am trying to get the values of a coded value domain and list them in an iList.
I used “Get Coded Value Domain” activity, the output of this activity is an “iDictionary” variable. I do not know what is the simplest method to transform the values of this iDictionary to iList; I tried converting the iDictionary to Datatable (using DictionaryToDataTable activity), then converted this Datatable into list (using DataTableToDataItemList activity). But in this activity I always get the error below.
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90660000000XaTf&feoid=Body&refid=0EM60000000XqmN"_/_img_
Any Suggestion?
Thank you in advance,
Hani,
0
-
I haven't really dealt much with this, but I found this link:
http://stackoverflow.com/questions/19346263/c-sharp-convert-idictionary-to-two-ilistsIList keys = myDictionary.Keys.ToList(); IList values = myDictionary.Values.ToList();You might be able to use this if you do it in a C# code in your workflow (or it might work without it since it requires the system.linq which is added to the workflow by default).0 -
If your goal is to convert the dictionary to a DataItemList, then you can just use the "DataItem List" output argument of the "Get Coded Value Domain" activity. One of the main use cases for this activity is to populate a list in a form so we created this second helper output for that purpose.
--Ryan0 -
Ryan,
My goal is to convert this iDictionary into iList in order to use it as input argument for combobox in a DisplayForm.
I could not implement your suggestion, since the "Get Coded Value Domain" activity accepts only the iDictionary as output argument.
Best Regards,0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare