I am trying to send an email summarizing the submission of a Form. In the form I have a DataCard that has a ComboBox input that accepts multiple selections. I have tried using:
SubmitForm(Form1);Office365Outlook.SendEmailV2("email@site.com","Subject",""Defect: "&Form1.LastSubmit.Defect.Value);
But, since the Defect DataCard is multi-select the Value is a table and is not compatible with LastSubmit.
How do I grab the selected items from the Defect DataCard and send them in the email?
Solved! Go to Solution.
First, your SubmitForm should be the ONLY function in your formula.
Never add additional functions after the SubmitForm for 2 reasons:
1) SubmitForm starts when you issue that formula. It does not wait to complete. It moves on to evaluate the next function in the formula. So there is no guarantee that the submitform has completed by the time it gets to the next function. So, LastSubmit directly after that function may be invalid and inaccurate. The form provides an OnSuccess action that lets you do additional actions after the form submits successfully.
2) If you issue a function after the SubmitForm....how do you know it submitted without error? You don't! and therefore you can be performing an action that will confuse users. This, again, is what the OnSuccess action on the form is for.
SO, your formula to submit the form should ONLY be: SubmitForm(Form1)
Your OnSuccess action formula should be:
Office365Outlook.SendEmailV2(
"email@site.com",
"Subject",
"Defect: " & Concat(Self.LastSubmit.Defect, Value & ", ")
);
The Concat function in that formula will provide a comma separated list of the values in your multi-select column.
I hope this is helpful for you.
Try using Concat() like this:
SubmitForm(Form1);Office365Outlook.SendEmailV2("email@site.com","Subject",""Defect: "&Concat(Form1.LastSubmit.Defect, Value, ","));
First, your SubmitForm should be the ONLY function in your formula.
Never add additional functions after the SubmitForm for 2 reasons:
1) SubmitForm starts when you issue that formula. It does not wait to complete. It moves on to evaluate the next function in the formula. So there is no guarantee that the submitform has completed by the time it gets to the next function. So, LastSubmit directly after that function may be invalid and inaccurate. The form provides an OnSuccess action that lets you do additional actions after the form submits successfully.
2) If you issue a function after the SubmitForm....how do you know it submitted without error? You don't! and therefore you can be performing an action that will confuse users. This, again, is what the OnSuccess action on the form is for.
SO, your formula to submit the form should ONLY be: SubmitForm(Form1)
Your OnSuccess action formula should be:
Office365Outlook.SendEmailV2(
"email@site.com",
"Subject",
"Defect: " & Concat(Self.LastSubmit.Defect, Value & ", ")
);
The Concat function in that formula will provide a comma separated list of the values in your multi-select column.
I hope this is helpful for you.
User | Count |
---|---|
122 | |
87 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
142 | |
109 | |
83 |