cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dtoland
Level: Powered On

Passing Collection content into email using concat()

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)))

 

1 ACCEPTED SOLUTION

Accepted Solutions
dtoland
Level: Powered On

Re: Passing Collection content into email using concat()

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 &

 

View solution in original post

1 REPLY 1
dtoland
Level: Powered On

Re: Passing Collection content into email using concat()

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 &

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 267 members 2,436 guests
Please welcome our newest community members: