Tinderbox Lesson, Nov. 16, 2024 (Video): Templates with Posters, Suggested Values, Dynamics Tables
Level | Intermediate to Advanced |
Published Date | 11/16/24 |
Type | Meetup |
Tags | 5CKMEl, 5Cs of Knowledge Management and Exchange, Action Code, ChatGPT, EmaiTempalte, HTML Tables, Posters, HTMLExportTemplate, Identiy Praxis, Inc., List Operators, Michael Becker, PosterTemplate, Suggested Value, Variables |
Video Length | 01:45:14 |
Video URL | https://www.youtube.com/watch?v=tflSBQKCP8s |
Example File | TBX L - Table as Poster R3 Becker.tbx (415.2 KB) |
Chat | GMT20241116-170303_RecordingnewChat.txt (1.8 KB) |
TBX Version | 10.0 |
Host | Michael Becker |
Forum Post URL | Tinderbox Lesson, Nov. 10, 2024 (Video): Bitwise Or Operator and Action Code Demos |
In this Tinderbox Meetup, we reviewed a simple solution for adding images and PDF representations and links to them (challenges raised by @ptc97504 ). We also covered and expanded upon a question backstage by @archurhh: how do you render tables derived from attribute values in map view? We came up with several elegant solutions and expanded on the question in several ways. This was a fantastic meetup that will help you understand how to 1) write action code, 2) methodically create a table template, 4) use different Tinderbox export attributes ($HTMLExportTemplate, $EmailTemplate, $PosterTemplate), 5) how to use Posters.
Detailed topics covered:
- Automated an attributed suggested value list with the names of a note’s children, which lets you have a dynamic selectable dropdown list
- Dynamically change the CSS style sheet being applied to a template; we reviewed style sheet syntax in some detail
- Asking ChatGPT to create CSS stylesheets code for us
- Ask ChatGPT to provide the HTML from an Excel table
- How to methodically step through an HTML table and have Tinderbox create it
- Dynamically creating tables based on child note $DisplayedAttributes, i.e, the displayed attribute list can change, and the table template will use the changed value. Note: We concluded the session by NOT being able to populate the table rows with the correct values because we could not collectively figure out the necessary code sequence. After the conclusion of the meetup, @satikusala spent 15 minutes quite a while figuring out the correct code syntax, and now table generation works. †
†Correct code element that was causing us the problem
vListDA.each(y){
var:string vAttri="$"+y+"("+x+")";
var:string vValue=eval(vAttri);
$Text("Log")+=" "+vValue;
vStr+=" "+ vValue+"\n";
};
What this code does is properly call the syntax $AttributeName(Note ID) to request the code value. @satikusa figured it out by evaluating some logs.
Correct output: