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 / Few ForAll, Collect an...
Power Apps
Answered

Few ForAll, Collect and ComboBox

(0) ShareShare
ReportReport
Posted on by 170

Hi guys, 

 

please help me to fix my code

 

I have two comboxes: CompanyName and JobTitle.

and I would like to build a table with fields: Company, Mails, JobTitles

Company: from combobox1

JobTitles: Concat(Combobox2)

Mails: All users for this Company with this JobTitles

So I cant get all users with 2 forAll. 

 

My code:

Collect(Mailing_Collection;
ForAll(ComboBox1.SelectedItems As _item;
{CompanyName: _item.Title;
JobTitles: Concat(ComboBox2.SelectedItems;'Job Title'&"; ");
Mails: ""})));;

ForAll(Mailing_Collection As _item2;
Patch(Mailing_Collection;LookUp(Mailing_Collection;CompanyName=_item2CompanyName);
{Mails: Concat(Filter('users';CompanyName=_item2.CompanyName;extensionAttribute12 in_item2.JobTitles);Mail)}))

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @shnurich 

    Please consider changing your Formula to the following:

    ForAll(ComboBox1.SelectedItems As _item;
     With({_jobTitles: Concat(ComboBox2.SelectedItems;'Job Title'&"; ")};
     
     {CompanyName: _item.Title;
     JobTitles: _jobTitles;
     Mails: Concat( Filter('users'; CompanyName=_item.Title; extensionAttribute12 in _jobTitles); Mail)
     }
     )
    )

     

    I hope this is helpful for you.

  • CU09100753-0 Profile Picture
    170 on at

    Thank U, it helps

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard