Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column Ordering #291

Merged
merged 5 commits into from May 10, 2020
Merged

Column Ordering #291

merged 5 commits into from May 10, 2020

Conversation

MarkMpn
Copy link
Collaborator

@MarkMpn MarkMpn commented May 1, 2020

Addresses the common issue of columns in results not matching the query - see #289, #275, + others closed as duplicates.

All selected columns should now be displayed even if they don't contain data, and no extra columns that weren't selected but the server returns anyway (e.g. transactioncurrencyid when selecting a money field).

Columns will be shown in the order shown in the tree view. This would work previously, but only if all link entities had an explicit alias. This change calculates what the system-generated alias will be for any that aren't explicitly defined.

I can't see any official documentation describing how the system generates an alias so this is based on my testing only and would be worth some more testing.

Another complication is the case of non-aggregate queries where an alias is applied to an attribute. The previous code converted the FetchXML to a QueryExpression which would lose this alias, which would mean this column would then not be displayed correctly. I'm not sure what the reason is behind this conversion - I've removed it for now to always execute the raw FetchXML but happy to look again at this if there's some reason to do this conversion that I've missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants