Skip to content

Instantly share code, notes, and snippets.

joshbduncan / token_highlighter.html
Last active May 5, 2021
Highlighting Flask Search Tokens With Javascript
View token_highlighter.html
<title>Flask Search Token Highlighter Javascript</title>
<link href="" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
.quote-list {max-width: 42em; padding-top: 3em;}
joshbduncan / checking-linked-records-in-airtable.js
Created Aug 4, 2021
Checking off linked record checkboxes via an Airtable script
View checking-linked-records-in-airtable.js
// get the two tables I need to work on
let jobsTable = base.getTable("Jobs");
let timeEntriesTable = base.getTable("Time Entries");
// get all time entries for later reference
let timeEntriesQuery = await timeEntriesTable.selectRecordsAsync();
// when run via button, automatically use that record otherwise choose
let record = await input.recordAsync('Choose a record', jobsTable);
// get all linked time entries for record
let linkedTimeEntries = record.getCellValue("Time Entries") || [];
output.text("Found " + linkedTimeEntries.length + " total time entries");