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:
Kyle P.
Past 24 Hours:
1
Prev. 24 Hours:
1
Overall:
5177
People Online:
Visitors:
227
Members:
0
Total:
227
Online Now:
New Topics
Lawson S3 Procurement
Adding Std Comments to all PO's
9/17/2024 7:06 PM
Does anyone know of a way to get trailing comments
Lawson S3 Procurement
Missing po info
9/4/2024 3:34 PM
We are experiencing an issue where freight account
Lawson S3 Procurement
We need to charge multiple items to 1 dept no mattter who orders the items. Our POs are out of company 1000 and cost centers are set up in company 1300. Does anyone else have this issue and have a way around it?
8/16/2024 1:55 PM
We have 3 items that need to be charged to the lab
Infor CloudSuite
Dbimport - only importing 1st record of file
8/13/2024 3:51 PM
In FSM Cloudsuite, I've got a file containing
Lawson S3 Procurement
How does everyone charge an item to 1 dept no matter who orders the item?
8/12/2024 6:20 PM
We have 3 items that need to be charged to the lab
IPA/ProcessFlow
WFWORKUNIT table, WF-STATUS field value set
7/25/2024 8:51 PM
documentation I can find has values for this field
Lawson S3 HR/Payroll/Benefits
Benefit change/termination rules
7/23/2024 2:22 PM
Can old benefit change/termination rules be delete
IPA/ProcessFlow
this.bean is null
7/19/2024 5:42 PM
Getting this error when my IPA gets to the second
IPA/ProcessFlow
Converting UTC Date to EST Date using Javascript
7/16/2024 2:53 PM
I'm looking for how others are performing a co
S3 Systems Administration
Changing the orgs email domain
7/12/2024 8:44 PM
Hello! We're changing our email
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1360
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Performance Management
Smart Notification
Javascript in SmartNote Template
Please
login
to post a reply.
2 Replies
0
Subscribed to this topic
72 Subscribed to this forum
Sort:
Oldest First
Most Recent First
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!
Please
login
to post a reply.