Hi all, I am not sure using alias would be easier for the users. Some thoughts :
* sometimes aliases are quite complicated, like "Contexte de l'édition" for a field named "context". We would need to escape properly aliases in expressions. And in this example, the real field name is much easier and shorter thant the alias * aliases can vary between projects or even between duplicate layers in the same project, whereas field names are stable. If I cannot reuse some expression for the same source table because I use different aliases, I would spend more time to rewrite the expressions ( except if we allow to use both in expression, but the user must then do the right choice) * I think the problem is more that as soon as you use alias for some field, it is then very "difficult" to find back what is the real name of the column in the source "table" : aliases are displayed instead of the column in every part of the Gui, which is fine but sometimes not wanted. For example, I would love to have a button in the attribute table which let me toggle between the aliases and the real field names as the table header. Best wishes, Michael 2014-09-10 19:00 GMT+02:00 Martin Dobias <wonder...@gmail.com>: > Hi Mathhias > > On Mon, Sep 8, 2014 at 6:19 PM, Matthias Kuhn <matthias.k...@gmx.ch> > wrote: > > Hi, > > > > I today was discussing the idea of support for column aliases in > > expressions. The use-case for this is that engineers using GIS in their > > language will be able to use the same field names that they are used to > (but > > not in the common database which is english) to filter the attribute > table > > etc. > > I am just wondering... how the aliases would be made accessible to > QgsExpression? Would be a map of aliases from vector layer set to each > QgsExpression instace? Or extend QgsFields to support also aliases? Or > something completely different? :-) > > Cheers > Martin > _______________________________________________ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-developer >
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer