Hi,
I’m sure I’m missing something simple, but I’m hoping this is possible.
I’ve got a String field and want to be able to select from a list of distinct values for that field from other records. I’ve created a ValueCollectionDatasource with the distinct query. I have a LookupField with the optionsDatasource set to that datasource and the captionProperty set to the name of the property set in the datasource. That displays the distinct list of values for that field correctly, but when I select one I receive an error:
“ConversionException: Unable to convert value of type com.haulmont.cuba.core.entity.KeyValueEntity to model type class java.lang.String. No converter is set and the types are not compatible.”
Also when opening an existing record, I receive an error:
“ClassCastException: java.lang.String cannot be cast to com.haulmont.cuba.core.entity.Entity”
Any suggestions would be appreciated.
Thanks,
Steven.