I have a bunch of files that have integer data for ratings between 0-5. I want to format it to a rating icon with stars. I found this interesting reply by @holroy (Replace metadatas by pictogram in my dataview table? - #3 by holroy) but not sure if it works with integers. Can someone help, please?
This is my query
TABLE WITHOUT ID "![coverimg|100](" + cover + ")" as Cover, link(file.link, title) AS Title, author AS Author, completed AS Read, ratingIcon as Rating
FROM "Books"
FLATTEN {0: "",1: "β ββββ",2: "β β βββ",3: "β β β ββ",4: "β β β β β",5: "β β β β β "}[rating] as ratingIcon
WHERE econtains(status, "read")
Thank you @holroy for your quick reply. Itβs sorted, I remember trying those quotes but maybe I had the FLATTEN pattern in the wrong place when I tried it I guess. Thanks again