Feature request #8743
Field calculator: allow "Formula" to receive a value from a "Number" parameter
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Victor Olaya | ||
Category: | Processing/Modeller | ||
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Easy fix?: | No | Copied to github as #: | 17457 |
Description
It would be useful to be able to insert a "Number" type parameter in "Formula" of Field Calculator. E.g:
I want to create new field and populate it with a user defined number using the Modeler.
History
#1 Updated by Filipe Dias about 11 years ago
If there's an alternative way of doing this, it could help answer this question:
http://gis.stackexchange.com/questions/72569/field-calculator-in-qgis-modeler-sextante/73054#73054
#2 Updated by Giovanni Manghi about 10 years ago
- Project changed from 78 to QGIS Application
- Category deleted (
64)
#3 Updated by Giovanni Manghi about 10 years ago
- Category set to Processing/Modeller
#4 Updated by Alexander Bruy almost 8 years ago
- Resolution set to fixed/implemented
- Status changed from Open to Closed
Fixed in master.
#5 Updated by Norwin Roosen almost 7 years ago
How is this solved? I still cannot reference model inputs within the field calculator, afaics. (in 2.18.15)
I searched the commits around 2017-01-09, but didn't find anything:
https://github.com/qgis/QGIS/commits?after=cf35affedcb93f7ef560397b52fc932838cacb04+8500
Please reopen if there isn't any commit fixing this, as this is really a big use case for the modeler.
#6 Updated by Stefan Newluck about 6 years ago
There are at least three other issues with the Field Calculator not accepting other input. This is not fixed.
https://gis.stackexchange.com/questions/262831/how-to-introduce-table-field-parameter-into-field-calculator-formula-in-qgis
https://gis.stackexchange.com/questions/292075/referencing-another-layer-in-field-calculator-inside-graphical-modeler
https://gis.stackexchange.com/questions/295323/vector-fields-as-input-variable-in-field-calculator
#7 Updated by Giovanni Manghi about 6 years ago
- Description updated (diff)
https://gis.stackexchange.com/questions/295323/vector-fields-as-input-variable-in-field-calculator
this definitely works here on qgis/master.
#8 Updated by Stefan Newluck about 6 years ago
this definitely works here on qgis/master.
Could you provide an answer (ideally with screenshots) to the gisSE answer then? I'm curious to find out how to do it.
#9 Updated by Giovanni Manghi about 6 years ago
Stefan Newluck wrote:
this definitely works here on qgis/master.
Could you provide an answer (ideally with screenshots) to the gisSE answer then? I'm curious to find out how to do it.
I tried exactly as in the screenshot in that question on GIS_SE.
#10 Updated by Christoph Fink almost 6 years ago
Giovanni Manghi wrote:
Stefan Newluck wrote:
this definitely works here on qgis/master.
Could you provide an answer (ideally with screenshots) to the gisSE answer then? I'm curious to find out how to do it.
I tried exactly as in the screenshot in that question on GIS_SE.
Creating a custom script would work alright I assume (ignoring for the moment, that the code provided on GIS SE is for pre 3.0 QGIS). But is that what was considered to have “fixed” this issue? Were you able to make it work without a custom script? (I can’t)
(Judging from the number of GIS SE questions on this I would believe that a simpler solution would be very much sought after by many. In my opinion, the field calculator from the processing toolbox, in general, is not exactly the most user-friendly – it could use an expression builder, e.g.)