You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MBCUSTOMQUERY result columns are generated in order by alias of selector but it should be by index of selector to keep a consistent column order no matter what alias is.
I additionally found a backend API changes columns order according to alias (high priority) or name but not an input index in MBQUERY().
It reads presets from the backend so I might need to change backend for this.
What do you think?
MBCUSTOMQUERY() can set an input index in the spreadsheet so the order can be changed no matter what the backend returns.
If I set amount's alias to "total" from event query in the MultiBaas then the column will be switched.
The back-end returns results in both cases as an array of objects (map). The elements (key/value pairs) are unordered by definition, even if the back-end always appears to return them in a consistent order, we cannot rely on this.
My suggestion for now is to use the default order for MBQUERY(), and for the spreadsheet plugin to re-order into the same order as the custom query for MBCUSTOMQUERY().
In the future (separate issue, low priority) for MBQUERY() we can first lookup the Event Query definition and then order by that order, but that is too much work for too little benefit at this point, I think.
MBCUSTOMQUERY result columns are generated in order by
alias
of selector but it should be byindex
of selector to keep a consistent column order no matter what alias is.alias: account, index: 0
alias: sender, index: 0
This part might need be fixed.
multibaas-for-google-sheets/src/library/Util.js
Lines 107 to 118 in 6518546
The text was updated successfully, but these errors were encountered: