matstein Posted August 8, 2019 Report Share Posted August 8, 2019 Is there any way to have a task send multiple records in one email if the records have a field that meet the certain criteria? Currently it sends one email per record, I would one email with all the records that meet the task criteria is possible. Thank you in advance! Quote Link to comment Share on other sites More sharing options...
1 Vitalikssssss Posted February 28, 2020 Report Share Posted February 28, 2020 Caspio Bridge 21.0 release brought a Tasks\Trigger enhancement which solve this case without complex Trigger\Tasks. There is a new block added to Triggered Action called "Table variable" which forms a table. You can insert table variable into email body and it will be formed link a table (HTML format enabled): Hope it helps someone. superfarts and kpcollier 2 Quote Link to comment Share on other sites More sharing options...
0 JolliBeng Posted August 9, 2019 Report Share Posted August 9, 2019 Hi @matstein, If you want to send email to multiple users who meet a certain criteria, yes that is possible. You can add the criteria under your WHERE clause. You may refer to this sample Task: For further information regarding Task, you may click this link. ~JolliBeng Quote Link to comment Share on other sites More sharing options...
0 matstein Posted August 9, 2019 Author Report Share Posted August 9, 2019 Thanks for the response, I actually would like to send multiple records inside the body of the email. Example.. Quote The following items are marked shipped.. Record1 Record2 Record3 Thanks Quote Link to comment Share on other sites More sharing options...
0 Glitch Posted August 20, 2019 Report Share Posted August 20, 2019 I think I already asked this before. They had some suggestions, but I don't think that's going to be possible as of the moment. Maybe you can check the last reply. Quote Link to comment Share on other sites More sharing options...
0 DefinitelyNot31337 Posted December 18, 2019 Report Share Posted December 18, 2019 With the recent Caspio Release 20, the features Variables and Loops on Triggers and Tasks should make this possible. This workflow is pretty advanced, the following are pre-requisites: 1.) Auxiliary (aux) table 2.) An Autonumber field in the table you would be selecting against. (Timestamps would also do, if they can be unique. But let's stick with autonumber. It's much simpler.) Below is a Trigger demonstrating this implementation. On an aux table, create an OnInsert Trigger, that: 1.) Instatiates variables: a. init (min autonumber), b. len (max autonumber), c.) ConcatText (placeholder of the concatenated Email text), d. counter (optional. To count the number of records involved) 2.) Loops through the TABLE we are selecting against, whilst concatenating the involved records. The WHILE loop does magic tricks to select the next lowest autonumber per iteration. 3.) Optional. Update the #inserted.EmailContent with the ConcatText 4.) Actually send the email. This works well on my end. *Except for the counter part. Haha. I just added that last minute. I'm too occupied in making this post comprehensible. Sorry for my bad English. Kidding aside, the EmailContent works well on my end*. ===== You can extend this trigger, perhaps, by: 1.) Adding WHERE clause to limit your DataSets 2.) Create a TASK to insert to this Aux table, therefore effectively creating reminders to your end-users. I hope this helps. DN31337 kpcollier 1 Quote Link to comment Share on other sites More sharing options...
0 BFuchs Posted December 25, 2019 Report Share Posted December 25, 2019 Hi, Quote the features Variables and Loops on Triggers and Task The suggested method is not available yet. Here is another way to accomplish it. Create a calculated field with something like below and have this as part of the email body. SELECT snv_id = 'Not updating your browser already resulted in the following records being submitted with missing info:' + char(10) + STUFF(( SELECT ', ' + snv_id + ' ' + CONVERT(VARCHAR(10), Visit_Date, 101) + ' ' + Client_Last_Name + ' ' + ' ' + Client_First_name + char(10) FROM _v_v_VisitNotes_Browser where _v_v_VisitNotes_Browser.nurse_User_ID_num_SNV= '[@authfield:Nurse_UserName]' FOR XML PATH('') ), 1, 1, '') Vitalikssssss 1 Quote Link to comment Share on other sites More sharing options...
0 Martinricky Posted December 27, 2019 Report Share Posted December 27, 2019 Yes please I also need this feature to relate one email to multiple records or opportunities..I hope Product Team can develop and add this feature. Quote Link to comment Share on other sites More sharing options...
0 kpcollier Posted December 27, 2019 Report Share Posted December 27, 2019 There is a post about this in the ideabox here. Not sure how often they actually check that page but it might help somewhat. I want this feature as well. Quote Link to comment Share on other sites More sharing options...
Question
matstein
Is there any way to have a task send multiple records in one email if the records have a field that meet the certain criteria?
Currently it sends one email per record, I would one email with all the records that meet the task criteria is possible.
Thank you in advance!
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.