Search code examples
mongodbslamdata

How to populate a dropdown list with Slamdata report


I'm using SlamData to create my report. I followed Slamdata's tutorial to populate a dropdownlist from database. I created a mark down with this query

committer = {!`SELECT DISTINCT idCategory FROM "/demo/ReportDB/TMCMSReportData" ORDER BY idCategory}

It return this error: enter image description here

Can you show me why I got this error?


Solution

  • The correct query would be:

    committer = {!`` SELECT DISTINCT idCategory FROM `/demo/ReportDB/TMCMSReportData` ORDER BY idCategory ``}

    Note the use of back-ticks (not single quotes) to escape identifiers (the location in the file system) and the double back-ticks surrounding the Markdown snippet. These changes occurred recently when SlamData was updated to use the latest version of Quasar. It looks like not all documentation on the SlamData website has been updated yet.