I have figured out how to show a related record within a gallery. It works when there is one added record in that relationship, however when I have several added records it is not showing.
We have educations where several of the teachers participate in. I'd like to list each teacher within the gallery.
Education_slot 1 has 3 Teacher.
So the way I have looked up a related record has been through ThisItem.City.Name. This way I was able to find the related record of city that the table row had been related to. Writing ThisItem.Teacher.Firstname is not working.
The Teacher column is related to the Systemuser table. Many to many relationship.
Someone suggested this way of listing all of the elated records but it's not working:
Concat(ThisItem.Teachers.Firstname ; Text(Value); ", ")
Everything is connected to Dataverse tables. If you know a video to look at or a blog or know the solutions on how to structure the code... let me know!
Yes, If you see in my example picture, it is the Swedish word "Förnamn" that is used. Unfortunately everything is in Swedish.
The data structure:
Here is the Forms where the System users are added to a record:
Here is the relationship between the table Course schedule and SystemUser. It's the many to many that is used, if it's better to create a Many-to-One relationship, I can do so. Many teachers should be able to be added to many courses.
Here I am able to get the related SystemUsers in a separate gallery, the referenced relationship is the many-to-many relationship.
Hope this helps!
@shavora In your main Table, if you have a field called Teachers a Lookup to the systemuser table, it can't be a M-to-M relationship because for M-to-M relationships you do not need a separate column. Dataverse maintains these relationships though an invisible junction table. So, I believe it is a 1:N relationship. Also in the Systemuser table there is no field called Firstname but rather 'First Name' as you can see below,
Would you mind sharing your data structure for me to help you better.
Thanks CNT, I tried it but it gives invalid argument:
@shavora Try this,
Concat(ThisItem.Teachers; Text(Firstname); ", ")
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional