<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Bernd, <br>
</p>
<p>May I suggest two tables?</p>
<p>You can create another table *control*, with just two columns:
name and active.</p>
<p>This could be filled with:</p>
<p>select distinct name, true from areas;</p>
<p>Your query would be like:</p>
<p>SELECT *<br>
FROM areas<br>
WHERE name IN (select name from control where active) <br>
</p>
<p>To change the virtual layer, you just need to open the *control*
table and click on the active column to set/unset as active. (You
may have to change the active column's edit widget to make it a
checkbox).</p>
<p>I didn't test it.</p>
<p>Regards,</p>
<p>Jorge<br>
</p>
<div class="moz-cite-prefix">On 12/12/19 17:12, Bernd Vogelgesang
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:4920d41c-09ba-aa89-427e-02d88781a122@gmx.de">Hi,
<br>
<br>
I have a layer with over 150 polygons, where 20 to 30 of them
change
<br>
their access status on a daily base. The information about the
status
<br>
comes in a quiet unstructured pdf, so there is no way to
automatically
<br>
read that in.
<br>
<br>
At the moment, I query the layer through a virtual layer like this
to
<br>
show the subset of restricted areas:
<br>
<br>
SELECT *
<br>
FROM areas
<br>
WHERE name IN ('a','b','c','l','p', 'x','y','z')
<br>
<br>
It is quite a tedious job to fiddle in the names into the query
string
<br>
every time, so I wonder if anyone knows a way, how to connect a
form
<br>
with check boxes of those area names, so when I submit it,
<br>
only the checked names will be inserted in that query.
<br>
<br>
I'm quite sure that this should be possible somehow, but I lack of
any
<br>
idea where to start. Or maybe solve this on a complete different
way?
<br>
<br>
Cheers,
<br>
Bernd
<br>
<br>
<br>
--
<br>
Dipl.-Geogr.
<br>
Bernd Vogelgesang
<br>
Siedlerstraße 2
<br>
91083 Baiersdorf/Igelsdorf
<br>
Tel: 09133-825374
<br>
_______________________________________________
<br>
Qgis-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<br>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
<br>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote>
<div class="moz-signature">-- <br>
<title>Email Signature</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<table style="width: 525px; font-size: 11pt; font-family: Arial,
sans-serif;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align:center; font-size: 10pt; font-family:
Arial, sans-serif; border-right: 1px solid;
border-right-color: #fb6303; width: 125px; padding-right:
10px; vertical-align: top;" rowspan="6" width="125"
valign="top"> <a href="https://www.geomaster.pt"
target="_blank"><img alt="Logo" style="width:105px;
height:auto; border:0;"
src="https://geomaster.pt/wp-content/uploads/2017/02/cropped-geomaster300x300-1.png"
width="85" border="0"></a> </td>
<td style="padding-left:10px">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="font-size: 10pt; color:#0079ac;
font-family: Arial, sans-serif; width: 400px;
padding-bottom: 5px; padding-left: 10px;
vertical-align: top;" valign="top"> <strong><span
style="font-size: 14pt; font-family: Arial,
sans-serif; color:#fb6303;">Geomaster</span></strong><br>
<strong><span style="font-size: 11pt; font-family:
Arial, sans-serif; color:black;">Jorge Gustavo
Rocha</span></strong> <span
style="font-family: Arial, sans-serif;
font-size:11pt; color:#000000;"><span
style="padding-right: 5px; padding-left: 5px;">
| </span>Software Engineer</span> </td>
</tr>
<tr>
<td style="font-size: 10pt; color:#444444;
font-family: Arial, sans-serif; padding-bottom:
5px; padding-top: 5px; padding-left: 10px;
vertical-align: top; line-height:17px;"
valign="top"> <span><span style="color: #fb6303;"><strong>e:</strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000;"> <a class="moz-txt-link-abbreviated" href="mailto:jgr@geomaster.pt">jgr@geomaster.pt</a></span></span>
<span><span style="padding-left:
5px;padding-right: 5px;"> | </span><span
style="color: #fb6303;"><strong>m:</strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000;"> +351 910 333 888<br>
</span></span> <span><span style="color:
#fb6303;"><strong>g:</strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000;"> 41.54094,-8.40490</span></span>
<span><span style="padding-left:
7px;padding-right: 5px;"> | </span><span
style="color: #fb6303;"><strong>v: </strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000; padding-left: 7px;">
510 906 109<br>
</span></span> <span> <span style="color:
#fb6303;"><strong>a: </strong></span> </span>
<span> <span style="font-size: 10pt; font-family:
Arial, sans-serif; color: #000000;"><span> </span>Rua
António Cândido Pinto, 67, 4715-400 Braga<br>
</span></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>