Things I have tried
Filtering with choices, quoting and unquoting the prio values, regex replacement, probably a few other things … this code seems like it should work, but obviously I’m missing something …
What I’m trying to do
I am trying to set up a table of incomplete tasks, where the tasks can contain data for prio, created date etc.
Bonus points - if there’s a good way to remove the bullet points from the grouped items in the columns. CSS isn’t my forté and not sure what to override here … This is not so urgent though and I can live with the bullets if need be
TABLE regexreplace(rows.Tasks.text, "\[.*$", "") AS "Task", map(row.Tasks.prio, (prio) => choice(prio = "1", "1️⃣", choice(prio = "2", "2️⃣", choice(prio = "3", "3️⃣", "*"))) ) AS "Priority", rows.Tasks.created AS "Created", rows.Tasks.due AS "Due" WHERE file.tasks AND !startswith(file.path, "_templates/") FLATTEN file.tasks as Tasks GROUP BY file.link
Create and Due dates come out fine, as does priority if I simply list
row.Tasks:prio, but if I try and convert the prio to an icon, it collapses the list, so the Priority column contains only one item per group (the file link), and this is set to “-”, not any of the values I want