web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Content of related lis...
Power Apps
Answered

Content of related list in gallery

(0) ShareShare
ReportReport
Posted on by 382

I'm working on an app for task management. It contains (among others) two lists: The first one contains the tasks and the second one contains all the people, that are working on the specific tasks. The two lists are related by the task ID from the main list.

Now I want to show the tasks in a gallery. One field should show the names of all the people (from the second list) that are working on that specific task, concatenated in one string.

I tried several syntax possibilities but either received an empty string or all the items from the second list show on each line of the primary list.

Can someone tell me what is the right syntax?

Thanks.

 

Categories:
  • uwenagel Profile Picture
    382 on at

    I think I should illustrate my problem to help people understand what I'm trying to do.

    These are the two tables:

     

    TableA

     

    ID

    Task

    1Task A
    2Task B

     

    Table B (related table with TaskID being a lookup to the ID of the first table)

     

    IDTaskIDSupporter
    11Name A
    22Name B
    31Name C

     

    The result should be like this

     

    colResult

     

    IDTaskSUPPORTER
    1Task AName A; Name C
    2Task BName B

     

    I tried the following syntax:

     

    ClearCollect(colResult,AddColumns(Table A,"SUPPORTER",Concat(Filter(Table B,TaskID.Id = ID),Supporter,"; ")))

     

    but it always shows 'Name A' in the SUPPORTER results column.

     

  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @uwenagel , welcome to the community

     

    There are a few ways to do this I will use filter.

     

    consider the two sources:

    •  __Tasks with and id and task name. 
    • __Assignees with a task id and assign name

     

    __Tasks (id, task)

    rubin_boer_0-1640701681452.png

    _Assignees (task id, assignee)

    rubin_boer_1-1640701723732.png

     

    Lets use filter to get all the assignees assign to the task id, which will be part of the gallery showing the __Tasks

    add a label to the task gallery and set the text to the code below

    rubin_boer_3-1640702150001.png

     

    Concat(
     Filter(
     __Assignees,
     id = ThisItem.id
     ),
     assign,
     ","
    )

     

    The result

    rubin_boer_2-1640702001158.png

    How many teasks do you have on average?

     

    Hope it helps,

    R

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard