I am trying to configure a notification message that includes a table of objects. It does not appear that the LIST_TABLE function can be used in the notification message initialization. So I created an HTML document with that function included and I declared that document in the HTML Message attribute of the notification. The notification is launched from a list of Investigators, so Investigator is in context.
The HTML document looks like this:
Hello <<Investigator.FirstName>>,
You currently have the following review assignments in POBITS:
Candidate, Purpose, Notes to Reviewer
<<LIST_TABLE('FIND Review WHERE Review.Reviewer=Investigator','CandidateName', 'Purpose', 'NotesToReviewer')>>
The message outputs like this:
Hello <>, You currently have the following review assignments in POBITS: Candidate, Purpose, Notes to Reviewer <>
I can fix the HTML issues but the problem is that nothing populates.
Email Notification with Table of objects
Email Notification with Table of objects
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
The Doc has to use < and >
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Email Notification with Table of objects
Thank you, but can you explain that, please?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
In the html file, the one that is on the file system, the file get the gets imported as the template,
You cannot use the greater than and less than merge symbols like you do inside aware.
You must use the Html designation
You cannot use the greater than and less than merge symbols like you do inside aware.
You must use the Html designation
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Email Notification with Table of objects
Thanks again.
My html doc looks like this:
Hello <<Investigator.FirstName>>,<br><br>
You currently have the following review assignments in POBITS:<br><br>
<<LIST_TABLE('FIND Review WHERE Review.Reviewer=Investigator','CandidateName', 'Purpose', 'NotesToReviewer')>>
My email message looks like this:
Hello <<Investigator.FirstName>>,
You currently have the following review assignments in POBITS:
<<LIST_TABLE('FIND Review WHERE Review.Reviewer=Investigator','CandidateName', 'Purpose', 'NotesToReviewer')>>
My html doc looks like this:
Hello <<Investigator.FirstName>>,<br><br>
You currently have the following review assignments in POBITS:<br><br>
<<LIST_TABLE('FIND Review WHERE Review.Reviewer=Investigator','CandidateName', 'Purpose', 'NotesToReviewer')>>
My email message looks like this:
Hello <<Investigator.FirstName>>,
You currently have the following review assignments in POBITS:
<<LIST_TABLE('FIND Review WHERE Review.Reviewer=Investigator','CandidateName', 'Purpose', 'NotesToReviewer')>>
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
Code: Select all
Hello <<Investigator.FirstName>>,<br><br>
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Email Notification with Table of objects
Kingsley,
Try simply placing your code in the Message attribute of the notification.
Try simply placing your code in the Message attribute of the notification.
As a test to confirm since I haven't done this in V8.4, I put this in the Initial Value of the Message field of my SystemSettings BO & sent it. Result was table list of BDLs:Hello <<Investigator.FirstName>>,
You currently have the following review assignments in POBITS:
Candidate, Purpose, Notes to Reviewer
<<LIST_TABLE('FIND Review WHERE Review.Reviewer=Investigator','CandidateName', 'Purpose', 'NotesToReviewer')>>
----Dear <<SystemSettings.EmailAddress>>,
Here is the list you requested:
<<LIST_TABLE (SystemSettings.BDLs, `Name`, `EmailAddress`)>>
Tom - V8.8 build 3137 - MySql / PostGres
Re: Email Notification with Table of objects
Note that the ` I used around the attributes are the character below the tilde on the keyboard.
Tom - V8.8 build 3137 - MySql / PostGres
Re: Email Notification with Table of objects
Thanks, Tom.
I've tied putting in the message and in an HTML document. The <<Investigator.FirtName>> prints out fine either way. No matter how I do the LIST_TABLE, no good. It either prints the whole command string (when in the HTML document) or nothing at all (when in the message block).
Does anyone see anything wrong with my LIST_TABLE construct?
I've tied putting in the message and in an HTML document. The <<Investigator.FirtName>> prints out fine either way. No matter how I do the LIST_TABLE, no good. It either prints the whole command string (when in the HTML document) or nothing at all (when in the message block).
Does anyone see anything wrong with my LIST_TABLE construct?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
Good call on the apostrophes; I always forget that. But still no joy. Here's the exact text in the HTML document:
Hello <<Investigator.FirstName>>,<br><br>
You currently have the following review assignments in POBITS:<br><br>
<<LIST_TABLE(`FIND ALL Review`,`CandidateName`,`Purpose`,`NotesToReviewer`)>>
Here's what I get:
Hello James,
You currently have the following review assignments in POBITS:
The LIST_TABLE function is simply ignored.
Hello <<Investigator.FirstName>>,<br><br>
You currently have the following review assignments in POBITS:<br><br>
<<LIST_TABLE(`FIND ALL Review`,`CandidateName`,`Purpose`,`NotesToReviewer`)>>
Here's what I get:
Hello James,
You currently have the following review assignments in POBITS:
The LIST_TABLE function is simply ignored.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
I have also tried changing the query string in the function to call a query i.e.,
<<LIST_TABLE(`InvestigatorOpenReviews`,`CandidateName`,`Purpose`,`NotesToReviewer`)>>
What is the significance that the query in the documentation example is not quoted?
<<LIST_TABLE(Client.Children, ‘FirstName’, ‘LastName’, ‘Age,#’)>>
I also do not know what Client.Children might represent in database terms.
<<LIST_TABLE(`InvestigatorOpenReviews`,`CandidateName`,`Purpose`,`NotesToReviewer`)>>
What is the significance that the query in the documentation example is not quoted?
<<LIST_TABLE(Client.Children, ‘FirstName’, ‘LastName’, ‘Age,#’)>>
I also do not know what Client.Children might represent in database terms.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
Client.Children ...
Client is a BO with a reference attribute named Children. Children would be a Multiple Allowed reference.
Client is a BO with a reference attribute named Children. Children would be a Multiple Allowed reference.
Tom - V8.8 build 3137 - MySql / PostGres
Re: Email Notification with Table of objects
Tried that i.e., Investigator.Review, no joy.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: Email Notification with Table of objects
You can put a query name in the first parameter like this:
<<LIST_TABLE (`A_BDL_Query`,`Name`,`EmailAddress`)>>
That's the syntax I suggest because you can run the query independently to ensure it delivers the intended results before trying to put those results in an email.
<<LIST_TABLE (`A_BDL_Query`,`Name`,`EmailAddress`)>>
That's the syntax I suggest because you can run the query independently to ensure it delivers the intended results before trying to put those results in an email.
Last edited by tford on Sun Aug 16, 2020 4:29 pm, edited 1 time in total.
Tom - V8.8 build 3137 - MySql / PostGres
Re: Email Notification with Table of objects
What Tom said .
Weird things happens with the LIST functions when trying to build the query/parameters in the tag so try that.
Weird things happens with the LIST functions when trying to build the query/parameters in the tag so try that.
Henrik (V8 Developer Ed. - Windows)