Just wondering how I'd do about getting all available Pre values for a given Dropdown, in .NET?
I'm doing a large batch of data migration, and would like to fish out the available values (for a given datatype), so I can map them appropriately on the new Umbraco documents. (So that document.getProperty(propertyName).Value = value will pan out)
For instance, I have a Data Type 'Region', using 'drop down list' picker, which has the values:
[12] - Australia
[13] - Pacific
The values behind may change across staging environments, so I'd like to retrieve them in the code programmatically.
Get available Pre values for an extended Dropdown
Hi,
Just wondering how I'd do about getting all available Pre values for a given Dropdown, in .NET?
I'm doing a large batch of data migration, and would like to fish out the available values (for a given datatype), so I can map them appropriately on the new Umbraco documents. (So that document.getProperty(propertyName).Value = value will pan out)
For instance, I have a Data Type 'Region', using 'drop down list' picker, which has the values:
The values behind may change across staging environments, so I'd like to retrieve them in the code programmatically.
Use this:
Hmm, that shows ugly, second try:
int
dataType = <your_datatype_id>;
System.Xml.XPath.XPathNodeIterator iterator = umbraco.library.GetPreValues(dataType);
is working on a reply...