joining data from different tables in an email plugin

Goldo911

Member
Hello.

I have a page in which users are able to record data in different lists on a monhtly basis, let's say, they plug in all their expenses (one list1 / one table1), car usage (another list2, another table2).

At the right hand I have added another form plugin with only one submission button which they use to basically notfy the admin that they have done their job for this month. this is linked to another table (validation status, list3, table3) and tracks the fact that this employee has submitted his expenses and car usage for this month and this year.

It does send an email on top properly warning the admin with a dynamic message 'employee xxx has submitted expenses and car usage for month yyy and year zzz.

Works fine. Question:

How can I arrange my mail plugin to also send inside the mail body the list of expenses and car usage plugged in for this employee, this month, and this year ? Would enable me to have better workflows and validation from the admin instead of having to access and dig into the database ?

Basically I need the plugin to be able to access other table/data (1 and 2) than the one the plugin is linked to (table 3), and to display their content sorting on current year, current month, and the id of the user that clicks the button. Today I only access table 3 buy using placeholders in the text body of the mail, I need to move to the next step.

Thx a lot for any valuable hint.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top