<div dir="ltr">Hi !<div><br></div><div>Postgres' arrays are a great feature. They allow store several values in one field :</div><div><br></div><div><font face="monospace, monospace">CREATE TABLE lots(</font></div><div><font face="monospace, monospace">    id serial,</font></div><div><font face="monospace, monospace">    owners text[]</font></div><div><font face="monospace, monospace">);</font></div><div><font face="monospace, monospace">INSERT INTO lots(owners) VALUES( ARRAY['john','mike','jenny'</font><span style="font-family:monospace,monospace">] );</span></div><div><br></div><div><font face="arial, helvetica, sans-serif">But is there a way to edit this cleanly in QGIS with the forms ?</font></div><div><font face="arial, helvetica, sans-serif">Natively, the form widget will be a plain text input, and the value will display like this</font></div><div><font face="monospace, monospace">{"john","mike","jenny"}</font></div>This is more or less usable for text fields, but not really clean, since the user needs to escape some characters, and it's not very readable. But then it's impossible to use with other widgets (checkbox, range, etc.)<div><br><div>I'd love to have a dynamic input where the user could add and remove fields, and where QGIS widget types could be used.</div></div><div><br></div><div>Actually, I'd even need a form where I'd have the same number of items for several arrays, and where adding/removing an item would work on several field at once, to work on a table like this :</div><div><div><font face="monospace, monospace">CREATE TABLE lots(</font></div><div><font face="monospace, monospace">    id serial,</font></div><span style="font-family:monospace,monospace">    first_names text[]</span><span style="font-family:monospace,monospace">,<br></span><span style="font-family:monospace,monospace">    last_names text[]</span><span style="font-family:monospace,monospace">,<br></span><span style="font-family:monospace,monospace">    age int[]</span><div><font face="monospace, monospace">);</font></div></div><div><font face="monospace, monospace"><br></font></div><div><div><div><br></div><div>Is there a way to do it ?</div><div>Maybe with python ?</div><div>Has anyone of you already done this and would agree to share ?</div></div><div>Any pointer in the right direction would be very welcome !</div></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks a lot in advance,</font></div><div><br></div><div><div dir="ltr"><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div style="font-family:arial;font-size:small">Olivier</div></div></div></div></div>
<br></div><div><font face="monospace, monospace"><br></font></div></div>