-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default value with an expression and "apply on update" #3226
Comments
Hiya! |
The expression for default value only works for new objects. Let us know if you are really interested. As far as I can remember, it were some technical limitations. |
the expression for default value doesn't work for new objects on lwc 3.6(.4) |
it depends also on the expression used it self : does it need the current geom ? does it need a previous field from the form ? |
@Gustry for expression involving geometries (example from point fill X and Y values in the table) would not be enough to force users to first draw/edit the geometry and then allow them fill the attributes? Having expression that fill a field based on the content of another field in the same form is simply impossible to obtain in LMWC or "just" hard to implement? |
It is already possible to set the filter of a combobox based on the drawn or modified geometry. This show that using an expression (filter or the value relation based combobox) is working. We should audit the JS code, and see if we can implement the default value, not only after the opening of the form, but also after the geometry have been drawn if the field is empty |
In Lizmap Web Client, the form is opened before we draw the geometry. In QGIS, from the main dialog, it's the reverse : we draw, then we have the form. Except when we do from the attribute table dialog, but then it's not possible to draw a geometry after. For "default values" only, we need to write down the different context :
As @mdouchin said, a audit of the different context must be done. This might vary between creation and editing with "Apply on update" ? Value relation widget which are filtering by geometry after the geometry is drawn is already working for instance, see https://demo.snap.lizmap.com/lizmap_3_6/index.php/view/map?repository=testsrepository&project=form_edition_value_relation_field about "Geom expression" field. PS 1 : On QGIS server, you should see requests coming for evaluating expressions, like PS 2 : I know it's more complicated, but in the meantime, there are some PG triggers which are possible and working well. It's not the same use case, but it's a workaround. |
@Gustry @mdouchin thanks. As explained by email privately in the past weeks I would look favorably a sort of meeting where you (3liz) could let us (final users) know about the roadmap, what is already planned to be implemented, what not, what are your thoughts about some features being requested, ways of funding/supporting their implementation, etc. |
I very much support what @gioman suggested - a roadmap would be very nice as well as your thoughts towards certain feature requests - like this here, which is kind of a "core" functionality of QGIS (came here because i was trying without success to get a default picture name when uploading pics...) |
What is the question?
Hi all,
I'm using lizmap 3.5, I have a QGIS project with some expressions as default value for fields. Editing with Lizmap I realised that "apply on update" doesn't work. Instead virtual fields are calculated but not visible.
Am I doing something wrong?
Thanks
Versions
QGIS 3.22.10
QGIS server LTR 3.22
LIZMAP 3.5.1
Check Lizmap plugin
QGIS server version, only if the section above doesn't mention the QGIS Server version
3.22.9
Operating system
WINDOWS SERVER R12
Browsers
Firefox
Browsers version
FIREFOX 104.0.2
Relevant log output
No response
The text was updated successfully, but these errors were encountered: