Start a new topic

Unable to cast object

I'm in the midst of testing version with some of my existing profiles. Within two of my profiles I have the line of code:

    import.Fields.GetByName("Rel Title/Gender").Value = Import.ApplyDictionary("Title/Gender Conversion",Import.Fields.GetByName("Gender").Value)


When that line runs I'm getting the error message:

Error in custom code AfterDictionaries: Unable to cast object of type 'WhereListIterator`1[OmaticIO.Base.Dictionary.OmaticDictionary]' to type 'OmaticIO.Base.Dictionary.OmaticDictionary'. Line:0 [CImport_Process_02.6]


I've commented out the line and the profile runs smoothly. With the line running, every record that hits the code errors out with the above message.


Anyone else run into this?


Jonathan Meester

Systems Analyst

OSF Healthcare Foundation


We did have some bug fixes related to dictionaries in version I've tested a version of your code with that version and was not able to replicate it. An upgrade may resolve this issue for you.
Correction! I can recreate that bug. I would still suggest upgrading to 3.1. There are many good fixes in there. I will add this issue to our short list.
Hey Nic,

I had our IT department upgrade my DEV server to 3.1, but I still receive the same error. Anything else I should try?

Login or Signup to post a comment