Select to view content in your preferred language

Pro SDK CodedValueDomain is always sorted

08-29-2023 08:25 PM
Occasional Contributor II

I was trying to report on any coded domains where the values in the domain were not sorted in order.  When you add a new domain code, it gets added to the end of the list and I want to know where these situations exist in our database.  But in the Pro SDK, the CodedValueDomain class only has the GetCodedValuePairs method to get access to these values and this returns a sorted list meaning they are not in the order they actually exist in the database.  I can just run a sort on all domain and that will probably be correct.  But I'd be concerned if there might be some domain that might have a specific non-sorted order that we don't want to change.  I'll probably do this in python but my primary development environment is C# and I have lots of code and helpers to work with so prefer to do these things here instead.  Would be helpful if the SDK could actually provide the needed information.

Tags (1)
0 Kudos
0 Replies