I have an issue when trying to get further information form a relationship field from Data Service in UiApps.
In the example below, an user is linked to its nutritionist (here this relationship has the name NutritionistId), but in Apps I need to filter a table in order to get the logged nutritionsit’s users.
This means that I should have been able to type/choose this option : [User.NutritionistId.Id “=” CurrentNutritionistId], but it seems impossibile.
Hopefully, you’ll give me a solution for this.
Many thanks!
Yes, that’s right. It seems that I can’t reach the particular fields of a relationship field. If I tried to do that in Studio, it would perfectly work, but not in UiApps.
Yes, but that’s a shame, because we cannot use the relationship between entities at all.
In real life matters, there will be a lot of cases when an aplication will need to go in further details using these relationship fields.
ex. In some cases I might want to show the name of an user’s nutritionist, but as you say, I will never be able to retrieve it directly using User.Nutritionist.Name in UiApps…
So by defining correct relationship of entity you can get the details. But if you are trying something like SQL where you can do some LEFT, Right all join and get the details that is not possible right away into Filter.
Hope this will help you.
Please mark this as solution if you are satisfied.
So, as a recap, the relationship field in Apps only allows me to get acces only to that specific field - in your case Type of LeaveType. I cannot acces any other fields of LeaveType through this relationship. Maybe I should rethink how to get the data I need, or maybe add more fields of relationship type for direct filtering in Apps, though I don’t know if this is good practice, as it leads to duplications.
It is still a bit confusing and disappointing because in Query Entitiy Activity in Studio, you can go further and fetch other fields coming from the relationship field - like a join in relational db as you said.
For now, seems that I should stick to process work and not rely that much on direct Apps capabilities for in depth filtering.