I’m not 100% sure this will work, but its worth a try.
1. Your snippet should take the resulting array and update a field in a UI Only model with that value (Look for the documentation on updateRow here )
2. Use the DataSource action for your Outlook data source that sends a message. The “TO” property will take a semicolon separated list of email addresses. If your UI Only field has that list you can use merge syntaxt to pass it in. Somthing like this: {{$Model.UiModelName.data.0.EmailAddressesFieldName}}
Good luck with this!
I was able to get this working, thank you Rob for your direction! Here’s a brief summary where I landed up to get it working:
Created a UI Model with UI Field.
Created global action that runs the Email Array snippet to populate the UI Model/Field, and then creates new row in Draft model via PopUp- populating the “ToRecipients” field with the string in the UI Field. Subject and Body fields are editable for user input
Added a button to the Draft model PopUp that saves Draft and runs an Outlook 365 Action : Send Draft
**Snippet: **
// Get the Email of the selected items as an Array
_var emailArray = skuid.$.map(argumentsu0].list.getSelectedItems(),function(item){ _
_ return item.row.Email; _
});
// Convert array to String
var emailString = emailArray.join(‘;’);
var $ = skuid.$,
_ model = skuid.model.getModel(‘UIEmAd’),_
_ row = model.getFirstRow();_
_ model.updateRow(row, {emadr:emailString}_);
Run Snippet and Create Rows Action Framework:
**Send Button Action Framework:
**
Thanks for documenting your solution back to the community. Sharing the riches!!!