Forum Discussion
Unable To Apply Query - OLE DB or ODBC error: [Expression:Error] expected a RenameOperations value
- 4 years ago
I'd probably choose to null all fields if there aren't exactly 3.
Something like this:
renamedrecord = if Record.FieldCount(sortedrecord) <> 3 then [Storage_Key = null, Network_Key = null, Condition_Key = null] else Record.RenameFields(sortedrecord, <...existing code here...> )
Instances where there are not 3 fields are edge cases (years-old entries made under a legacy system, which are unlikely to be included in any analysis).
A cursory glance at the legacy entries suggests there is never fewer than 3 fields, and I'm trying to think of the simplist solution to allow the query to apply to the model, so perhaps always name the first 3 fields as per the current query, and return a null value for subsequent fields?
Would that work? Or can you think of a more elegant solution?
I'd probably choose to null all fields if there aren't exactly 3.
Something like this:
renamedrecord =
if Record.FieldCount(sortedrecord) <> 3
then [Storage_Key = null, Network_Key = null, Condition_Key = null]
else Record.RenameFields(sortedrecord, <...existing code here...> )- al3584 years agoFrequent Visitor
Alexis, you are indeed a Super User and a credit to the community; this worked perfectly! Thank you for your help.