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 / Using a Concatenate() ...
Power Apps
Answered

Using a Concatenate() function, the retrieve column data from within a gallery

(0) ShareShare
ReportReport
Posted on by 147

Hello all,

 

I am trying to make a Concatenate() function work, but it doesn't seem to want to...

 

Basically, I have two databases. One with Orders, and one with Articles (within these orders).

 

Database Orders

IDOrder NumberSellerBuyer
1967HGBob G.Jim P.
28455KJHanna C.Tom P.
3847TYBob G.Ella V.

 

Database Items

IDOrder ID (Title)Article NumberPrice
113947GBD-99€65,-
213947GBD-99€65,-
3134879UI-723€75,-

 

These tables are connected in that the Title of Database Items is the ID number of the relevant order in the Database Orders.

 

Now, within the app there is a gallery with an overview of the Database Orders. However, for Sellers, it's very convenient to immediately see from within this view what Article Numbers are connected to the Orders. For this I want a text label that uses a Concatenate function:

 

Concatenate(
 Filter('Database Items', Text(Title) = Text(ThisItem.ID)).'Article Number', 
 ", "
)

 

 Now, I have tested the Filter() function in this on a separate gallery, and it seems to work. However, for the rest of the function, it doesn't. It's expecting a 'Text'.

 

Does anyone know how to tackle this issue? Later on a would also like to add a Distinct() function to weed out duplicate Article Numbers, but I need to first get this to work.

Categories:
  • realwillwright Profile Picture
    772 Moderator on at

    Hi @Daniël 

     

    Can you try using Concat rather than concatenate, concatenate joins two strings. 
    Concat and Concatenate functions - Power Platform | Microsoft Learn
    -------------------------------------------------------------------

    If my reply helped you, please give a 👍
    If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it.

  • Daniël Profile Picture
    147 on at

    Hi, thank you for replying!

     

    I updated the code:

    Concat(
     Filter('Database Items', Title = Text(ThisItem.ID)).'Article Number', 
     ", "
    )

     

    It definitely works better, but still not quite. It works as a function, in that I can see the comma's in the label now (", , , , , , "), yet it doesn't actually print the Article Numbers.

     

    Any idea how to approach this?

     

     

  • Verified answer
    realwillwright Profile Picture
    772 Moderator on at

    Hi @Daniël 

     

    You need the article number outside of the filter. So you have your data source, column you want to display and the separator 

    Concat(
     Filter('Database Items', Title = Text(ThisItem.ID)), 'Article Number', 
     ", "
    )

     
    -------------------------------------------------------------------

    If my reply helped you, please give a 👍
    If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it.

  • Daniël Profile Picture
    147 on at

    I swear I had tried that, but I guess not. It does work now. Thank you so much for your quick replies and help.

     

    Do you by any chance also know how to include a Distinct() function within this one?

     

    My instinct would be something like this:

    Concat(
     Distinct(
     Filter('DataBase Items', Title = Text(ThisItem.ID)), 
     'Article Number'),
     'Article Number',
     ", "
    )

     

    But that doesn't seem to do it...

  • realwillwright Profile Picture
    772 Moderator on at

    That looks good to me

  • Verified answer
    Daniël Profile Picture
    147 on at

    I figured it out, the solution was to use 'Value' instead, as Distinct basically turns the column name into Value.

     

    Concat(
     Distinct(
     Filter('Database Items', Title = Text(ThisItem.ID)),
     'Article Number')
     
     , 
     Value,
     ", "
    )

     

  • realwillwright Profile Picture
    772 Moderator on at

    Awesome, well done

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard