-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Be able to use aliases. #1039
Comments
Hi First, normally we don't use alias unless you do aggregated queries. But I know, according to the docs, it works. Second screenshot: I have the same issues, in the "raw" result, it doesn't show up. If I remove alias from attributes, it shows up. Third screenshot: FetchXml Tester always just shows the data returned. In my grid view it's trying to show it with correct column name etc. which my be something I should try to show alias name instead. My query when I'm trying: <fetch>
<entity name='contact'>
<attribute name='fullname' alias='ThePerson' />
<attribute name='ownerid' alias='TheOwner' />
<link-entity name='systemuser' from='systemuserid' to='ownerid' alias='USER'>
<attribute name='lastname' alias='TheOwnerLastname' />
</link-entity>
</entity>
</fetch> Result in a "not friendly" view: Raw result: <resultset morerecords='0' paging-cookie='<cookie page="1"><contactid last="{41388504-F44A-EC11-8C62-6045BD8F5259}" first="{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}" /></cookie>'>
<result>
<contactid>{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}</contactid>
</result>
<result>
<contactid>{DBD00E67-6E63-EC11-8F8F-000D3A2D112C}</contactid>
</result>
<result>
<contactid>{B8706CDA-EEE4-EC11-BB3C-000D3A3A8AD0}</contactid>
</result>
<result>
<contactid>{2355B467-533E-EC11-8C63-000D3A4A08D0}</contactid>
</result>
... Querying without aliases: <resultset morerecords='0' paging-cookie='<cookie page="1"><contactid last="{41388504-F44A-EC11-8C62-6045BD8F5259}" first="{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}" /></cookie>'>
<result>
<fullname>Anders Rapp</fullname>
<ownerid dsc='' type='8' yomi='Jonas Rapp' name='Jonas Rapp'>{B5863A5C-5934-EC11-8C65-000D3A217588}</ownerid>
<contactid>{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}</contactid>
<USER.lastname>Rapp</USER.lastname>
</result>
<result>
<fullname>Frederick W. Sturckow</fullname>
<ownerid dsc='' type='8' yomi='Jonas Rapp' name='Jonas Rapp'>{B5863A5C-5934-EC11-8C65-000D3A217588}</ownerid>
<contactid>{DBD00E67-6E63-EC11-8F8F-000D3A2D112C}</contactid>
<USER.lastname>Rapp</USER.lastname>
</result>
... |
Hi,
Thanks for your answer.
It seems you get the same result as I did.
Will you continue to investigate it or is it just not possible to implement in FXB?
That is, getting the raw result output correct when using attribute-alias.
Regards
…________________________________
Från: Jonas Rapp ***@***.***>
Skickat: den 11 april 2024 12:10
Till: rappen/FetchXMLBuilder ***@***.***>
Kopia: Tomas Wall ***@***.***>; Author ***@***.***>
Ämne: Re: [rappen/FetchXMLBuilder] Be able to use aliases. (Issue #1039)
Hi
First, normally we don't use alias unless you do aggregated queries. But I know, according to the docs, it works<https://learn.microsoft.com/power-apps/developer/data-platform/fetchxml/select-columns#column-aliases>.
So it works, and it works for me at least.
Second screenshot: I have the same issues, in the "raw" result, it doesn't show up. If I remove alias from attributes, it shows up.
At this point I'm not sure if the issue is in FXB or in the SDK. But I see that the SDK has deprecated that request<https://learn.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.executefetchrequest.-ctor>.
Third screenshot: FetchXml Tester always just shows the data returned. In my grid view it's trying to show it with correct column name etc. which my be something I should try to show alias name instead.
My query when I'm trying:
<fetch>
<entity name='contact'>
<attribute name='fullname' alias='ThePerson' />
<attribute name='ownerid' alias='TheOwner' />
<link-entity name='systemuser' from='systemuserid' to='ownerid' alias='USER'>
<attribute name='lastname' alias='TheOwnerLastname' />
</link-entity>
</entity>
</fetch>
Result in a "not friendly" view:
image.png (view on web)<https://github.com/rappen/FetchXMLBuilder/assets/2572253/2103f555-7cf7-4f5c-858c-5eb207b1beb4>
Result in a "friendly" view:
image.png (view on web)<https://github.com/rappen/FetchXMLBuilder/assets/2572253/3e32b178-68d4-4088-a63a-4509ebdae7ba>
Raw result:
<resultset morerecords='0' paging-cookie='<cookie page="1"><contactid last="{41388504-F44A-EC11-8C62-6045BD8F5259}" first="{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}" /></cookie>'>
<result>
<contactid>{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}</contactid>
</result>
<result>
<contactid>{DBD00E67-6E63-EC11-8F8F-000D3A2D112C}</contactid>
</result>
<result>
<contactid>{B8706CDA-EEE4-EC11-BB3C-000D3A3A8AD0}</contactid>
</result>
<result>
<contactid>{2355B467-533E-EC11-8C63-000D3A4A08D0}</contactid>
</result>
...
Querying without aliases:
<resultset morerecords='0' paging-cookie='<cookie page="1"><contactid last="{41388504-F44A-EC11-8C62-6045BD8F5259}" first="{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}" /></cookie>'>
<result>
<fullname>Anders Rapp</fullname>
<ownerid dsc='' type='8' yomi='Jonas Rapp' name='Jonas Rapp'>{B5863A5C-5934-EC11-8C65-000D3A217588}</ownerid>
<contactid>{5E7F1131-2DAD-EC11-9840-000D3A2BC35A}</contactid>
<USER.lastname>Rapp</USER.lastname>
</result>
<result>
<fullname>Frederick W. Sturckow</fullname>
<ownerid dsc='' type='8' yomi='Jonas Rapp' name='Jonas Rapp'>{B5863A5C-5934-EC11-8C65-000D3A217588}</ownerid>
<contactid>{DBD00E67-6E63-EC11-8F8F-000D3A2D112C}</contactid>
<USER.lastname>Rapp</USER.lastname>
</result>
...
—
Reply to this email directly, view it on GitHub<#1039 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BHXAEFCKCGGQ2SZJDLLNRF3Y4ZORLAVCNFSM6AAAAABF75A2UWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGM3DCMRVGY>.
You are receiving this because you authored the thread.
|
I was thinking about any Alias shall override DisplayName in "Friendly" view, and make sure LogicalName are shown in "raw" view. I'm working now for solving a bunch of new features, and fixing some bugs. We'll see if I solve this one for this release. |
Sorry, I misunderstood your request, I was thinking about View Result and not Friendly. I have investigating more regarding I have improved the View Result though, with better handling of Alias. I believe this issue is now "solved", as far as possible. |
Hi, thx for a great tool. A question, if I use aliases on fields they don't seem to show up at all in the result.
Am I doing something wrong or is this something that could be fixed?
I can run this in the fetchxml tester tool though and get the result with fields named.
The text was updated successfully, but these errors were encountered: