@WarrenBelz
Hi Warren!
Sorry for the late response, I was working on your debugging method and had some issues. I used the label with the coding you provided, and oddly enough there were no results, which must mean nothing was collected. However, emails are still sent when the form is submitted.
I thought the data was collected for colReviewResults within the Collect() statement within the nested ForAll() function to send the emails once the form is submitted, but your label testing method says otherwise.
The current issue with the send-email function is that it won't update after the first form is submitted and a new form is filled out/submitted. The collection contents (email addresses) stay the same and won't update to the supposed, new collection contents from the new form.
I tried adding a Clear(colReviewResults) to the end of my code of the OnSuccess of my Edit Form but it doesn't work ~ it actually makes the collection not collect any contents at all. I did the same of placing Clear(colReviewResult) to the OnVisible of my Edit Screen and the OnStart of my app but both had the same outcome.
I even tried using If() Statements to say that: If() = varRecord.FormStatus = "New", Clear(colReviewResults) ... but that didn't work either.
Essentially, all I need is for:
When the form is submitted, emails should be sent to the email addresses listed in the colReviewResults collection ~ this part is successful
Once the emails are sent out, the collection should be cleared so that the next new form's selections can determine what items (email addresses) should go in the collection ~ this part is not successful - the collection stays the same and does not update when a new form is being filled out after the original form
And for further detail...
*the first ForAll(colReviewUsers) takes into account the collection that is created from the OnStart of the application ~ it pulls all information from our list ('cfa review materials') ... which holds all info for "Country" and "Review Material"
*the second ForAll(colCombineReviewMaterial) is a collection that concatenates the Country name selected from our form's combo-box with each of the Review Materials selected from the form's combo-box (ex: "France * January" ) ... and puts it under the column "Value" .
...If the "Value" column matches the "FullFieldName" column value from the colReviewUsers, it will collect the value the 3 values stated in my code (based on what the user selects in the form) into another collection, colReviewResults.
I know that this is a bit of a tricky situation so I sincerely appreciate your time, help, and efforts.