I’m wondering how to fetch an entity table and include another field from entityB where a field in entityA have relationship to.
One of the example is I have a Customer entity which has TimeZone as relationship type to the TimeZone entity. I want to use fetch and display the customer entity with the TimeZone name which is in the TimeZone entity.
Do you have any common coloumn between both? If yes then first get the common column value using the customer name and then use one more get from entity B to get the related timezone using that common column value
@Anil_G Thanks for the reply. The common column is the TimeZone column with relationship as type to the TimeZone table. can you show me an example of how the expression would look like? I’m trying to use it as data source for the table. Unfortunately the doc isn’t very good at explaining the fetch function and what the parameters do.
Thanks all. Yes. As I suspected. I did rise this with though insider more than a year ago. I figure, it may be possible to us VB to do so now…
I do try and avoid calling robot process as possible, due to the delay in responsiveness. It was one of the main reasons for us to create copies of data in data services in the first place.
I hope the feature will be implemented soon.
In case anyone else is looking for this (possibly me in the future): if you set up the two entities with a Relationship as LeoRX has done, you can edit the addExpansionFieldOption from the data source query to add the additional column. You can then manually add a new column to the edit grid and set the Source property to “[RelationshipCol].[ForeignCol]”
I don’t know if you can chain this somehow (get a relationship of a relationship), but it was good enough for my use case.
For example, I’m using the following as a data source and then access the columns in the edit grid with “ABPosID.Positionsnummer” and “BestellPosID.Positionsnummer”:
Fetch(of ABDifferenzen)(createFilterGroup(Nothing, New FilterGroup(){createFilterGroup(New QueryFilter(){addFilter(MainPage.EditGrid.SearchColumn, “contains”, MainPage.EditGrid.SearchTerm)}, Nothing, 0)}, 0), New PaginationProps(MainPage.EditGrid.PageStart, MainPage.EditGrid.PageLimit), New SortOption(){addSortOption(MainPage.EditGrid.SortColumn, Not(Not(MainPage.EditGrid.isDescending)))}, Nothing, New ExpansionFieldOption(){addExpansionFieldOption(“ABID”, New String(){“Id”}), addExpansionFieldOption(“ABPosID”, New String(){“Id”, “Positionsnummer”}), addExpansionFieldOption(“BestellID”, New String(){“Id”}), addExpansionFieldOption(“BestellPosID”, New String(){“Id”, “Positionsnummer”}), addExpansionFieldOption(“CreatedBy”, New String(){“Id”,“Name”}), addExpansionFieldOption(“UpdatedBy”, New String(){“Id”,“Name”})})