I absolutely believe you both, but I’ll say, this is a rule I have broken for a long time then!
Like I say, the BAQ designer does not have a problem with me not displaying the columns even now. And I have to believe that classic dashboards were not always this way.
I’ve always tried to keep to a minimum the number of fields I display in a BAQ. For the simple fact that it’s cluttered and that makes me sad lol.
I thought that was required, but you are right @GThom , it’s not. I learned something I guess.
Question for @JasonMcD , is that the only UD field that you would be using in the query? I’m wondering if it uses the ERP table instead of the DBO view if it’s not bringing back a UD field. For a test, can you show some other custom field, than try to order by this field?
I just tested that here, and it still works even with UD fields.
I’m gonna assume that there is some level of complexity somewhere that triggers this issue. I have seen the error like @JasonMcD posted, so it’s a common thing, but it seems to be situational.
@JasonMcD , is that field coming from a subquery? (in your original post)
Edit: tested that too, no error.
Looks like a fun new years riddle to figure out how to create that error again. lol.
That’s the difference. I didn’t try it in Kinetic. Looks like the editors are doing something different. That’s probably worth a ticket to say it works differently from one system to another. Although, since the workaround is so easy, I kind of doubt you’ll get much traction.
Also worth tagging @Rich … I wonder if there is some underlying issue in the browser with the EpiMagic behind the whole “auto joining” of the erp.abcd and erp.abcd_UD sql tables?
I cannot say anything else except “report it”.
If you wonder what is the difference, then you can dump SQL statements generated for both dashboards in the log and compare them.
Flag is: <add uri="profile://ice/fw/DynamicQuery/BaqStatement" />
Just chiming into say I got bitten by this recently too but hadn’t taken the time to report it - if the BAQ executes successfully then the app studio layer shouldn’t fail. I can see the app studio layer includes the field names of the sort by fields (UD or not) in the call to the BAQ. This seems like a bug to me, and potentially related to the bug where app studio also automatically includes fields from the subquery that are not part of the top level query. Would love to see a PRB on this.