Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Performance Management
Smart Notification
Javascript in SmartNote Template
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
TomV
Past 24 Hours:
1
Prev. 24 Hours:
2
Overall:
5186
People Online:
Visitors:
357
Members:
0
Total:
357
Online Now:
New Topics
Lawson Landmark
LPL INSTR Functions
4/5/2024 8:32 PM
I'm writing a simple report using the Create R
Infor SCM
Translating 856 to get the ~ REF^CN^ field
4/3/2024 8:24 PM
We are trying to get the tracking number which is
IPA/ProcessFlow
Sample XML file create Flow
4/3/2024 3:43 PM
Hello everyone, I am new to creating XML files
Lawson S3 HR/Payroll/Benefits
bn105 error message
3/26/2024 6:40 PM
I need to change some of the set ups in our Life I
IPA/ProcessFlow
IPA executing Job
3/13/2024 7:08 PM
New to the IPA world and was wondering, can an IPA
Lawson S3 HR/Payroll/Benefits
Life Age Reduction on benefits plans
3/12/2024 7:15 PM
For our optional life we have an age based coverag
Lawson S3 HR/Payroll/Benefits
BN53.1 Add-In
3/7/2024 3:31 PM
We are migrating to Solstice. They require a
Lawson Business Intelligence/Reporting/Crystal
Domain Name Change
3/5/2024 7:45 PM
Our domain name needs to change and was hoping I c
S3 Customization/Development
Cobol calling Shell Script
2/29/2024 1:27 PM
Has anyone created or modified a Lawson Cobol prog
Infor ION
ION vs IPA
2/29/2024 1:24 AM
We had a person new to Lawson and Infor go to Info
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1348
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Smart Notification
Javascript in SmartNote Template
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
Randall
Veteran Member
Posts: 44
4/15/2013 4:27 PM
Hi all,
We have a user that is looking to have an altered delivery of his SmartNote to include checkboxes and other items that he can use when he prints out records, in addition to being able to print out one record per page (the important piece). I've been able to create a new master template with some Javascript to accomplish most of it, but have hit a problem when trying to recursively run through the records returned.
Using the Template Tokens, I can get the number of rows returned with [rowcount?table=1]
I then try using a 'for' loop to go through these records to display either the headers of the tables or the data itself.
Using [cell?table=1&row=1&col=1] will give me the first header item. BUT, if I tried something like:
for (x=0; x <= 13; x++) {
[cell?table=1&row=1&col=x]
}
... will not return a value. I guess I don't mind too much if I have to hard code the table headers, but looping recursively through the data elements is going to be a pain if the 'cell' Template Token does not allow you to pass it a variable.
Has anyone tried anything like this and had any luck? You could bring back a little bit of my sanity :blink:
Matthew Nye
Veteran Member
Posts: 514
4/15/2013 4:43 PM
Randall,
Congrats on using SmartNotes templates as they should be used. unfortunately the token templates are rendered on the server side, so by the time the javascript is run, they have already been converted to HTML. That means youre only option is to parse the HTML DOM itself looking for all your header names. You can identify the headers and the actual rows by using the css class definitions as such:
notificationSectionLeft = header
listCellEven or listCellOdd = data row
I typically use jQuery to iterate, modify and add my HTML objects back to the DOM.
It can be a bit daunting at first but once youve done it youd be surprised at all the cool things you can do with SmartNotes.
Randall
Veteran Member
Posts: 44
4/15/2013 4:55 PM
Awesome, thanks Matthew. I was toying around with jQuery a bit to parse the DOM, but wanted to make sure the 'cell' token wouldn't accept a variable. That definitely helps and I appreciate the response. Now let's see how far this rabbit hole goes :)
Thanks!
You are not authorized to post a reply.