Hi All. I have a collection (and a gallery) that contains values for various data points. Each row in the collection will not have a value for every column. How can I send an email using the collection (or the gallery) that will only send non-blank values?
The canvas app addresses employee status changes. An entry could include a change to a department, salary adjustment, title, manager, etc. An initial dropdown drives the available selections. If the user selects Department from the Change Type dropdown, they are presented with options to change the department, effective date and a text field. If instead of Department they select Salary Adjustment, the user is presented with options of Current Rate, New Hourly Rate, Bill Rate and Multiplier. Rinse and report for each item within the Type of Change dropdown. The selected changes are added to a collection that populates a gallery. Multiple Change Types can be added to the gallery, for example if someone has their title, department and manager changed.
I'd like to send an email that only includes the changes the user has selected. For example, if a user selected to change their title, I want to exclude items associated to the salary adjustment options, instead I would like the salary adjustment options to be omitted from the email because they are irrelevant to the request.
As it stands, I'm using the Concat command on the collection and it includes all fields from the collection. Any help is greatly appreciated.
Office365Outlook.SendEmailV2(
"email@email.com",
"Employee Status Change",
"A status change for <b>" & EmployeeName_3.Selected.DisplayName & "</b> has been received.<br><br>
The request was submitted by <b>" & User().FullName & "</b> on <b>" & Now() & "</b>.<br><br>"&
"<b><u>THE CHANGES:</b></u>" &
Concat(
BulkChanges,
"<br> Effective Date: <b>" & EffectiveDate & "</b><br> Change: <b>" & TypeOfChange & "</b><br> New Manager: <b>" & NewManager & "</b><br> New Department: <b>" & NewDept & "</b><br> New Classification: <b>" & NewClassification.Value & "</b><br> Current Rate: <b>" & CurrentRate & "</b><br>New Hourly Rate: <b>" & NewHourlyRate & "</b><br> New Bill Rate: <b>" & NewBillRate & "</b><br> Multiplier: <b>" & NewMulti & "</b><br> Offboard Type: <b>" & OffboardType & "</b><br> M2M License: <b>" & M2mLicense & "</b><br> New Location: <b>" & RelocationPlace & "</b><br> New Title: <b>" & NewTitle & "</b><br>Explanation: <b>" & Notes & "</b><br><br>"
) &
"Regards,<br>"
& User().FullName,
{
Bcc:"imwatching@email.com",
Importance: "High"}
)