[Qgis-user] Default Value for a Widget

Randal Hale rjhale at northrivergeographic.com
Mon Aug 27 13:47:25 PDT 2018


That's exactly what is happening. Its works fine on an update but not on
initial creation. Give me a bit and I'll test it with a virtual field. I
should have fallen back to the docs and read before asking.

I appreciate the help. This is exciting (not what I wanted to happen but
exciting still).

On Aug 27, 2018 4:39 PM, "DelazJ" <delazj at gmail.com> wrote:

Hi Randy,
It might be because, at the time of feature creation QGIS does not know
about what you filled in the other fields; this feature is a kind of
"insert before" trigger. See the note at
https://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#default-values
How does it play if your total field was (temporary) a virtual field?

HTH,
Harrissou

Le lun. 27 août 2018 à 22:28, Randal Hale <rjhale at northrivergeographic.com>
a écrit :

> I have an address point database. There are some string calculations
> that have to happen after a point has been added. I've hit a bit of a
> stuck spot with this one.
>
> I have three fields: fielda. fieldb, and fieldc
>
> When the user adds the information for those three fields I have one
> field that needs to add the three strings together. In the fieldtotal
> column I set up an expression (in the attributes form) for the default
> value that is: "fielda" || ' ' || "fieldb" || ' ' || "fieldc" and place
> that in default value.
>
> example: "123", "MAIN", "456" and I want "123 MAIN 456"
>
> It won't calculate at the end - it's as if I'm forgetting to set
> something. If I check the "Apply default value on update" checkbox it
> will update if I edit the point - just not on initial point creation.
>
> I'm pretty sure I'm missing something.
>
> Randy
>
> --
> Randal Hale
> rjhale at northrivergeographic.com
> https://www.northrivergeographic.com
> (423)653-3611
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180827/a00bbaf4/attachment.html>


More information about the Qgis-user mailing list