Can you use repeat with data from datablaze

I would like to use repeat and import data from datablaze.
I have 5 records, and 5 fields. I am only using 3 fields and Count field is hidden.

{repeat: for name in Topics}
{dbselect: SELECT Name, Count, topic details FROM Topics WHERE Name == "value"; space=xxcodexx ; menu=yes; multiple=yes}
{=choice}
{=topic details}
{endrepeat}

Result
There should be 5 topics and under the heading for each a detailed description should show.

I am getting an error
Unknown name "Topics"

It orks if I am not using the loop.

This is possible, you want something that looks roughly like the following.

{dbselect: SELECT Name, Count, topic details FROM Topics WHERE Name == "value"; space=xxcodexx ; menu=yes; multiple=yes; name=topics}
{repeat: for topic in Topics}
{=topic.Count}. -- Note the field names are case sensitive
{=topic["topic details"]} -- Note the field names are case sensitive
{endrepeat}

Note the use of the name setting on the dbselect command to store the topics into a named list.

Thank you so much, off to try it out and learn more. You guys are absolutely amazing!!!

Getting error message:
Invalid Data Blaze query – unexpected “d” in “…c det…”

I guess the issue is the space in the name. If I use only lowercase for field names, can i use the underscore or dash if space is not acceptable?

For field names that contain special characters like spaces you need to quote the name with backticks.

E.g. ...Count, `topic details` From...

Perfect, thank you.

Now when changes are implemented I am able to bypass Invalid Data Blaze queryby reconfiguring the folder to allow access Configure folder. Works perfectly.

The only issue is I have no options in the snippet.

image

If you have no options consider getting rid of your where clause or adjusting it. WHERE Name == "value" might not match any of your data.

Thank you for providing simple answers, much appreciated. As you can tell not very fluent in SQL.

Make sure to check out our BSQL reference. It introduces the SQL concepts we support:

I have duplicated the snippet, then moved into a different folder, allowed team to be viewers of DB and now getting error message when trying to fix Invalid Data Blaze query by reconfiguring the folder to allow access Configure folder. When I hit save another error pops up: An issue occurred while saving. If this issue persists, please report it to support@blaze.today.

Can you shoot us an email at support@blaze.today and we can set up a call to look at this.

will do, thanks