TagInput - Add filtered relationship with different name than entity throws error

I was trying to …

  1. Add tagged field on the form
  2. I created relationship with Filter:
    Coach => ValidLicences (getting data from entity called Licence and filtered to show only ValidLicences)
  3. I created virtual field of type Array and used ArrayRelationship configuration:
  4. I put the field into related data stuctures and I put related entity into datastructures with the name ValidLicences
  5. I put tagged field into the Sceen Section displaying virtual field

I was expecting …

Screen will be loaded, all tagged fields will be displayed

Instead I’ve got …


I already have entity called Licence in the data structure and it has bit different meaning so I would like to have there ValidLicences. In Visual Studio I debugged the code and the problem is that there is a query to get string_agg of “validLicences” which uses the name of the “Relationship” instead of name of the actual entity and name of the “Relationship” as alias.

           FROM   [ValidLicences]
           WHERE  refConsolidatedCoachId = [Coach].[Id]
       )                                 AS [ValidLicences],

Currently this is a limitation. When rendering the aggregation query from the entity field we probably expect that the related entity in the data structure will have the same name. We could adjust it that it would find the first related data-structure-entity and if aliased, it would name it correctly. But it would not solve the problem when you have 2 such entities. Then it wouldn’t know which one to pick.

But if you would have 2 different entity relationships (e.g. with different filters), it would be solvable (by adjusting to the alias). Using the same relationship twice in the data structure would not have a solution though.

Hi Tomáš,

I am not sure if I understand correctly. In my case I have 2 relationshiops between the same entities Coach => Licence:

Relationship Description
Coach_Licence contains all licences including expired or future licences. Used to display all licences in the “child” screen section
Licence Filtered to contain only licences currently valid (by the time period).

I would need to solve 2 issues:

  1. Relationship Licence is not a good description to explain what relationship it is. I would like to have a name ValidLicences but I cannot use it because of the mentioned error in the aggregation.
  2. In the table view of “lazy loaded” entity the tag input displays all licences instead of only “ValidLicences”


Which both I consider as a bug when the tag input displays data from incorrect relationship and when it fails with Alias.

Is there any problem in my considerations vs. implementation limitations?

Does it mean that the SQL chooses a wrong relationship based only on its name?

I see now. We will have a look at that.

1 Like