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 / Passing Collection con...
Power Apps
Answered

Passing Collection content into email using concat()

(0) ShareShare
ReportReport
Posted on by 29

I have an app tieed to our Dynamics CRM database to add customers (contacts) onto a training request (ie forklift safety, etc...) The user pulls up a list of all customers for a given account using a gallery with filters to narrow down to just users that need updated credentials.

 

At that point I have a "Request Training" button that copies the gallery into a collection called ClassRoster using  and redirects the user to a new screen

 

Navigate(RequestTraining,ScreenTransition.None,{displayitem:LookUp(Certifications,c9_certificationid=LabelFilterCert.Text,c9_name)});ClearCollect(ClassRoster,GalleryCerts.AllItems)

At this point the user updates fields such as date and time of training and then can remove items from the collection if needed

 

 

Where I run into the problem is the concat() function in the Office365.SendEmail(). In the past when I've used that function the Collection has been built one item at a time and a variable such as "ContactName" was set to the gallery item "Contact Name" and I could call that field in the Concat("Name: " & Contact Name) 

 

Now I pulled the entire Item into the collection and I pull fields just like i do in the collection (ThisItem.fullname) but when I try to pass this through in the email string using 

Gallery4_1.Selected.fullname

or using the name of the label the resulting email just has the first gallery items name repeated for every item in the email.

 

Any ideas of what i'm doing wrong? 

 

Here's the full button script with both the gallery.selected.fullname and the label name in for example:

Office365.SendEmail(CurrentUserEmail,displayitem & " Employee Training Request","Requested Date: " & DatePicker1_1.SelectedDate & Char(10) & "Requested Time: " & DropdownHour_1.Selected.Value & ":" & DropdownMin_1.Selected.Value & DropdownAMPM_1.Selected.Value & Char(10) & "Comments: "& Comments.Text & Char(10) & Char(10) & Concat(ClassRoster,"Name: " & fullname & ThisItemStuName & Gallery4_1.Selected.fullname & Char(10) & "Date Received: " & c9_datereceived & Char(10) & "Renewal Date: " & atc_expirationdate & Char(10) & Char(10)))

 

Categories:
I have the same question (0)
  • Verified answer
    DevCrm16 Profile Picture
    29 on at

    I figured it out I just needed to pass the dynamics field name directly instead of using the cell name or selected item value:

     

    Wrong:

    ThisItemStuName & Gallery4_1.Selected.fullname &

     

    Correct:

    & atc_studentname &

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard