Hi,
I have 2 different tables resulting from sql queries. I wanted to get a record count from each table and then pass that along in an email to show number of records in each table. What is the best way to do that? I have used metadata, ‘Total Rows’ but I wanted to use that. Is there a way to assign the value of total rows to a parameter? Then when calling a module to send email, pass that value a long to the send email module looking like:
Table1 Records: [Table1Count]
Table2 Records: [Table2Count]
Any help would be greatly appreciated
Hi @EasyMorphNewbie,
Yes, you can do that in EasyMorph, obtaining the row count of each table, and then sending those values as parameters to a child module. I attach a sample project that does that:
Send Email with Metadata.morph (7.6 KB)
Parent Module: obtain each row count, then join them in a table and use the “Call another module/project” action to send the values as parameters to the child module “Send Email”.
“Send Email” child module: the parameters coming from the parent module are included in the body of the email.
Regards
1 Like
Thank you for your help with this. My only comment is when calling the send email module when choosing values from this project, make sure you select drop down arrow net to value, then choose first value, then choose the total you want because there are 2 on the same row, but this works great. I couldn’t get the arow to expand when trying to capture it but I highlighted it. When you see it expand, choose first value, then click on the drop down in the box to the left and choose ex. CollectCount, then for the other one I chose CompassCount. Hope that helps