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 / Trouble with a tricky ...
Power Apps
Unanswered

Trouble with a tricky concatenate requirement with a collection

(0) ShareShare
ReportReport
Posted on by 829

Hello Folks -

 

I'm having trouble with a new business requirement and hoping you can help me solve?

 

I have a Form for my "Assets" and then another form containing "Investments".  The Asset is the Parent and Investment is the child (think hierarchy) and there can be many Investments rolling up into an Asset.

 

My source is SharePoint Lists and I have included the "Asset" information in the "Investment" table for joining purposes.

 

During "On Visible" on my Asset Form, I'm trying to collect values from the Investment table in comma delimted form (if applicable, otherwise just return a single distinct record) and display that value on my Asset form.

 

Here is the table structure to better illustrate:

Asset Table:

AssetIDAssetAlias
4568test
3456test2

 

Investment Table:

Investment IDAssetIDAssetAliasPartnershipAlias
4568-22224568testChickenParm
4568-22234568testChickenParm
4568-22244568testChickenParm
3456-12343456test2Veal Parm
3456-12343456test2Sausage Parm
3456-12343456test2Sausage Parm

 

What I'm trying to do is join on the AssetID and then return the "PartnershipAlias" value. The caveat is if there are duplicates, I want return just the single value, but if there are multiple instance, I need to return the distinct values in comma delimited form.

 

So on my Asset Form, the field I am trying to use will display Chicken Parm for AssetID 4568 while Asset ID 3456 will display Veal Parm, Sausage Parm.

 

Is this possible? Thank you!

 

 

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    Hi @simms7400 ,

    Well, on On Visible property of the screen set an context variable as:

     

     

    UpdateContext(
     {associatedInvestment:
     Concat(
     Distinct(
     Filter(Investments,AssetID=selectedAssetID),
     PartnershipAlias
     ),
     Result&",")
     }
    )

     

    where selectedAssetId is the selected AssetID from Asset Table probably in one of your previous screen (or the record AssetId value of form's item property).

     

    Use this context variable in the control you want to display the info.

     

    Hope it helps !   

     

  • simms7400 Profile Picture
    829 on at

    @gabibalaban 

     

    Thank you!!  That basically works. But is there a way to only display the "PartnershipAlias" value, I don't need the AssetID value displayed.

     

    Thank you!

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @simms7400 ,

    Just hide (set the Visible property to false) or delete the control with AssetID from the form, the context variable gives you only  the "PartnershipAlias" value.

    May a screen shot will help me to figure it out what you need ...

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard