FetchXMLBuilder
FetchXMLBuilder copied to clipboard
View layout not show attribute in the view
When I add an attribute in the fetch, the option to show attribute in the view is unchecked by default sometimes, but if I select to display it in the view, I don't know why, when executing the query, it is unchecked and the attribute is not shown. It also happens when I add a relation and try to include some attribute of the relation, it does not show me the attribute
Aahh... I've tried to fix this for a while. Yes, I know it's there. But I don't really see the pattern. Please add more info, if you find any! 🙏
I have several examples of when this issue is occurring, one is an aggregate query and one is not, both have link-entity. In both cases, there are attributes missing from the results.
<fetch aggregate="true"> <entity name="esdc_role"> <attribute name="esdc_name" alias="Role" groupby="true" /> <link-entity name="esdc_roletracking" from="esdc_role" to="esdc_roleid"> <attribute name="esdc_headcount" alias="Headcount" aggregate="count" /> <filter> <condition attribute="esdc_headcount" operator="eq" value="1" /> </filter> </link-entity> </entity> </fetch>
Results
Only the "esdc_name" (alias Role) column appears.
Example 2:
<fetch> <entity name="role"> <attribute name="name" /> <link-entity name="systemuserroles" from="roleid" to="roleid" intersect="true"> <attribute name="systemuserid" /> <link-entity name="systemuser" from="systemuserid" to="systemuserid" intersect="true"> <attribute name="domainname" /> <attribute name="fullname" /> </link-entity> </link-entity> </entity> </fetch>
Results:
Only 'name' column appears
In both cases, I was able to run these queries as SQL and received the correct results
It's not clear at all, I shall improve it, but can you please add an Alias to each link-entity?
When using the Layouts, it is needed to be able to show these related attributes.
I'll give that a try and report back to you
On Sat, Oct 8, 2022, 6:05 a.m. Jonas Rapp @.***> wrote:
It's not clear at all, I shall improve it, but can you please add an Alias to each link-entity? When using the Layouts, it is needed to be able to show these related attributes.
— Reply to this email directly, view it on GitHub https://github.com/rappen/FetchXMLBuilder/issues/771#issuecomment-1272266812, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASPRNG7ECREO7PLAK6G653TWCEW4FANCNFSM57HGEIMQ . You are receiving this because you commented.Message ID: @.***>
Adding the alias to the link entity worked for me. thanks!
Adding the link-entity alias worked for me, too. Thanks!
On Wed, Oct 12, 2022, 2:41 a.m. Ben Brown @.***> wrote:
Adding the alias to the link entity worked for me. thanks!
— Reply to this email directly, view it on GitHub https://github.com/rappen/FetchXMLBuilder/issues/771#issuecomment-1275597478, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASPRNG7G4R335JQS7Y236RLWCZB7RANCNFSM57HGEIMQ . You are receiving this because you commented.Message ID: @.***>
Related issues: #775, #803, #804, #819
Added these warnings:

Closing this now - please reopen if there is more to fix! Or create a new issue.