Hi again!
I have a snippet where I use Data Blaze to read multiple rows (usually 2-4).
I want my snippet to include a small table -- basically, it should reprint the rows pulled, though I only want some of the columns, not all.
I see how to use the {repeat} command to print each item in a list on its own line. But I'm not sure about working with multiple lists -- how would I output something like this:
Jane 29 female
John 29 male
etc?
Bonus question: outputting them in plain text like above would be OK - I can add delimiters for ease of reading - but in my ideal world, it would be a small table. Since I don't know how many rows the user will select, I don't know how many rows this table would be. Is it possible to generate it to the same number of rows as I've selected?
In case it's useful info for anyone else, a note:
Now I need to update my variable names elsewhere in the snippet
before: {=book[1]}
now: {=InsertedTable[1].book}
(I think I got that right)
Hi Dan - just wanted to follow up here- for some reason I am unable to view the video - it doesn't load in - would you mind sharing the code you wrote to accomplish this? Thank you
Hi Dan, in the same general vein as your most recent response - is there a way to generate a table which shows all of the rows which correlate to a single name , so for example: If there were multiple "Bobs", how would I generate a table within my snippet which shows all of the Bobs and their corresponding ages
Using the same example:
I added. a filter to the DBSelect (Where Name="Bob") and removed the menu.
I'm using count(people) to determine the number of rows. (Poeple is the name of the output of the DBSelect command)
{dbselect: SELECT Name, Count FROM Table1 WHERE Name="Bob"; space=id; menu=no;multiple=yes;name=people}
There are {=count(people)} people with the name Bob
{if: count(people) > 1}There are multiple people with the name Bob{endif}