Tinderbox Lesson, Nov. 16, 2024 (Video): Templates with Posters, Suggested Values, Dynamics Tables

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:

  1. Automated an attributed suggested value list with the names of a note’s children, which lets you have a dynamic selectable dropdown list
  2. Dynamically change the CSS style sheet being applied to a template; we reviewed style sheet syntax in some detail
  3. Asking ChatGPT to create CSS stylesheets code for us
  4. Ask ChatGPT to provide the HTML from an Excel table
  5. How to methodically step through an HTML table and have Tinderbox create it
  6. 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. :slight_smile:

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:

2 Likes

Well done to @satikusala for figuring out the fix. In hindsight, I think most of the syntax fails were due to calling $Attr rather than $Attr(Some note), but as you’ll see the syntax for this is, err, ambiguous at present.

1 Like

will this video make it on the meetup list? that would be nice. thank ypu @satikusala

Yes, it is on the complete list 2, as we hit a character limit on the first list, which is explained in the first list, perhaps not well enough (please provide suggestions):