This function returns values in the visual format (e.g. "Aug 2018"), but then when I want to set this loaded value later using selectValues, I have to use '43282' instead. Not too intuitive...
Right now it looks like my best bet is to translate the visual value (e.g. "Aug 2018") to an index number by using getData(), then set the value using field.select([indexNo], false, true). It's a bit of a detour, but I'm hoping it will get the job done.
I'm having the exact same challenge. My extension allows users to save the selection state and then re-apply at a later stage. But when re-applying selections, I can't consistently use selectValues, as some of those fields might be in date/numeric format and won't work.
At the same time, the SelectionObjectDef which is returned by app.selectionState or "CurrentSelections" does not contain the qNum property for each selection value. Just great.
Similar to your suggestion, looks like for every selection I want to apply, I'll have to get the field from Sense so that at least I have the qText/qNum equivalent and can determine if I should use the string or number when calling selectValues. A bit of an overkill I wanted to avoid, but can't see any other options at the moment.