<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Sql Queries&#x2F;Sql Datapoint Confusion]]></title><description><![CDATA[<p dir="auto">I'm storing test files in the jsondata table in the H2 database. Each test file gets its own row. I need a way, from javascript, to query the table for a specific test (row) so I can extract data from the "Data" Column. I understand that you can input the xid into the ma-json-store directive, but this won't work for me because the filenames can't be hardcoded. I'm not sure how to do this and I've been trying/looking at all of the docs for a few days now.  An example of what my jsondata table looks like is:</p>
<p dir="auto"><strong>JSONDATA</strong><br />
<img src="https://camo.nodebb.org/c242bb4934a1ac183500d12a7e4d6ffe986979aa?url=https%3A%2F%2Fi.imgur.com%2Fm4lxOos.jpg" alt="0_1510623920129_jsondata.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">I'm able to insert and extract data from the row with the name "filename". For instance I can add to and get filenames from the jsonobject under the "DATA" Column. However, once I retrieve the filename from code, I don't know how to use it to get the corresponding row's data. An sql query to do what I want would be:<br />
select data from jsondata where name='&lt;name of desired file&gt;' . But I can't figure out how to achieve this using sql_datapoints/datasources/the ma-json-store directive. Thanks for your help.</p>
]]></description><link>https://forum.mango-os.com/topic/3080/sql-queries-sql-datapoint-confusion</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 01:37:52 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3080.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Nov 2017 01:44:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sql Queries&#x2F;Sql Datapoint Confusion on Tue, 14 Nov 2017 20:42:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi avilla,</p>
<p dir="auto">Are you putting your variable name into <code>{{ }}</code> to evaluate it?</p>
<p dir="auto">This works for me,</p>
<pre><code>&lt;ma-calc input='"mangoUI-menu"' output="output"&gt;&lt;/ma-calc&gt;
&lt;ma-json-store xid="{{output}}" item="myItem" value="data"&gt;{{myItem}}&lt;/ma-json-store&gt;
</code></pre>
]]></description><link>https://forum.mango-os.com/post/16197</link><guid isPermaLink="true">https://forum.mango-os.com/post/16197</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 14 Nov 2017 20:42:16 GMT</pubDate></item><item><title><![CDATA[Reply to Sql Queries&#x2F;Sql Datapoint Confusion on Tue, 14 Nov 2017 19:21:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jared-wiltshire" aria-label="Profile: jared-wiltshire">@<bdi>jared-wiltshire</bdi></a> Yes a custom page. I'm using the loginPageTemplate. I don't think using the ma-json-store directive as you wrote it will work because then the filename is still hardcoded. Unless there's a way to pass a variable to the xid attribute? Sorry I'm not experienced with html/javascript. I've tried that exact code, but it doesn't seem to work with a variable passed in. The only other way I can think of doing it is putting all my data in the same row.</p>
]]></description><link>https://forum.mango-os.com/post/16194</link><guid isPermaLink="true">https://forum.mango-os.com/post/16194</guid><dc:creator><![CDATA[avilla]]></dc:creator><pubDate>Tue, 14 Nov 2017 19:21:03 GMT</pubDate></item><item><title><![CDATA[Reply to Sql Queries&#x2F;Sql Datapoint Confusion on Tue, 14 Nov 2017 16:19:06 GMT]]></title><description><![CDATA[<p dir="auto">OK I guess the big question is where are you trying to extract this data to? Are you trying to display this on a custom page or something?</p>
<p dir="auto"><code>select data from jsondata where name='&lt;name of desired file&gt;'</code><br />
The direct analog of this SQL you provided for a dashboard is <code>&lt;ma-json-store xid="name of desired file" item="myItem" value="data"&gt;&lt;/ma-json-store&gt;</code></p>
]]></description><link>https://forum.mango-os.com/post/16167</link><guid isPermaLink="true">https://forum.mango-os.com/post/16167</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 14 Nov 2017 16:19:06 GMT</pubDate></item></channel></rss>