<div dir="ltr">Hi,<br><br><div class="gmail_extra"><br><div class="gmail_quote">2016-07-24 10:59 GMT+02:00 Lene Fischer <span dir="ltr"><<a href="mailto:lfi@ign.ku.dk" target="_blank">lfi@ign.ku.dk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Kory,<br>
<br>
<br>
Field calculator :<br>
It works fine here - If you select a feature - and update - please remember the toggle for 'Only update selected feature'<br>
So if you have selected one feature and then updated.<br>
Also remember - that a calculation is only values at that moment. It is not a dynamic calculation. You have to update if you move your feature.<br>
<br></blockquote><div>And to complete Lene's answer, if you want the value to be live-updated, you might use <a href="http://docs.qgis.org/2.14/en/docs/user_manual/working_with_vector/attribute_table.html#editing-attribute-values">virtual field</a><br> <br></div><div>Harrissou<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regards<br>
Lene Fischer<br>
<br>
<br>
<br>
<br>
<br>
-----Oprindelig meddelelse-----<br>
Fra: Qgis-user [mailto:<a href="mailto:qgis-user-bounces@lists.osgeo.org">qgis-user-bounces@lists.osgeo.org</a>] På vegne af Kory Roberts<br>
Sendt: 24. juli 2016 10:18<br>
Til: <a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>
Emne: [Qgis-user] QGIS 2.16 Form View and Field Calculator Buggy?<br>
<div class="HOEnZb"><div class="h5"><br>
I'm running into all kinds of seemingly buggy behaviors with the form view and field calculator on QGIS 2.16.  Here are some actions and results:<br>
<br>
FORM VIEW<br>
1) Start a fresh QGIS project.<br>
2) Create a new point Shapefile layer.<br>
3) Add a new field "test_num" as a decimal number and "text_txt" as text data.<br>
4) Toggle edit mode and add a point.  Give id as "1", others as NULL.<br>
5) Save layer edits.<br>
6) Open attribute table in table view and enter some text in "text_txt".<br>
7) Switch to form view.<br>
---- BUG 1?: "text_txt" displays NULL instead the text.  Clicking around and even saving does not seem to refresh the view.  The only thing that seems to work is to click off of the item in column preview and then select it again.<br>
8) In form view, open field calculator.<br>
9) Select update existing field and "text_num".<br>
10) Enter a number in the expression space and click OK.<br>
---- BUG 2?: "text_num" displays no change.<br>
<br>
FIELD CALCULATOR<br>
11) Add another point to the canvas.<br>
12) Save edits.<br>
13) Open field calculator.<br>
14) Enter "$x" in the expression space and check the output preview.<br>
15) Select the other point.<br>
16) Recheck the value for "$x"...It's the same as before.<br>
---- BUG 3?: This might be me misunderstanding how these variables work, but I thought $x and $y should change depending on the current feature selected or being edited?  In an actual work layer with many points, I keep getting the same values for $x and $y regardless of what I try.<br>
<br>
Trying similar actions to bug hunt has resulted in at least 2 freezes/crashes of QGIS along the way, too.<br>
<br>
~Kory<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></div></div></blockquote></div><br></div></div>