Forum Discussion
TylerJablonski1
2 years agoQrew Trainee
Cool idea. You can use the API to query for the employee data, and then use a for loop to iterate over the response and generate the HTML for the table. Here's the API documentation. Additionally, here's some documentation on creating/setting elements with Javascript: Document.createElement() - Web APIs | MDN (mozilla.org), Element.innerHTML - Web APIs | MDN (mozilla.org)
You could generate the HTML for the table entirely in your Javascript code. Alternatively, you could generate the table for each individual employee in Quickbase using a formula field, then use the API to query for that formula field and just append them together and put them in your container table.
------------------------------
Tyler Jablonski
------------------------------
You could generate the HTML for the table entirely in your Javascript code. Alternatively, you could generate the table for each individual employee in Quickbase using a formula field, then use the API to query for that formula field and just append them together and put them in your container table.
------------------------------
Tyler Jablonski
------------------------------
- RossonLong12 years agoQrew Cadet
I don't know why I hadn't thought of building the HTML into a formula field in the first place! This is a brilliant idea!
The only math I would need to do for that is formulas looking to see if the Employee ID# is divisible by 8 or has a trailing decimal of .875 (7/8) for page breaks and divisible by 2 for rows.
Eventually they will want to remove employees that are no longer part of their company, so the challenging part will be actually just be "numbering" the employee records with a second numeric variable that populates the pages without employees who have been let go.
Thanks for sending over all this stuff! Super helpful!I'll try it all out and come back here and post the results later.
------------------------------
Rosson Long
------------------------------