Re: Sort order for Value Map widget values

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Sort order for Value Map widget values

Giovanni Manghi

I am using a value map lookup to let the user select a month on a form. I used the ‘Load Data from Layer option and the months are displayed in a somewhat random looking order. Is there any trick to getting the values to display in ascending order of the key? Or is this a bug?

Hi Tim,
is a long standing bug.

cheers!

-- G --

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Sort order for Value Map widget values

Andreas Neumann-4

Hi,

The alternative (workaround) is to put your values in another table and link them through a shared key. Then the sorting works fine. Also the relation reference widget (which requires a relation) sorts values fine.

Of course this doesn't mean the bug in the value map shouldn't be fixed. You can ask a developer familiar with the widgets (e.g. Matthias or someone else familiar with the widgets) to fix it, as part of our bug fixing program.

Greetings,

Andreas


Am 22.03.19 um 15:26 schrieb Giovanni Manghi:

I am using a value map lookup to let the user select a month on a form. I used the ‘Load Data from Layer option and the months are displayed in a somewhat random looking order. Is there any trick to getting the values to display in ascending order of the key? Or is this a bug?

Hi Tim,
is a long standing bug.

cheers!

-- G --

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Sort order for Value Map widget values

Tim Sutton-6
Hi



On 22 Mar 2019, at 15:04, Andreas Neumann <[hidden email]> wrote:

Hi,

The alternative (workaround) is to put your values in another table and link them through a shared key. Then the sorting works fine. Also the relation reference widget (which requires a relation) sorts values fine.



Yeah I tried that, the problem is I want to reference the lookup list from the same table:

Flowering_month -> months table
Fruiting_month -> months table
Pruning_month -> months table

If I try to use the relation system for that the months table is removed as a relatable table after it has been used once (another bug maybe)?

Of course this doesn't mean the bug in the value map shouldn't be fixed. You can ask a developer familiar with the widgets (e.g. Matthias or someone else familiar with the widgets) to fix it, as part of our bug fixing program.



Yeah it would db great if you could fix that next time you are doing paid bug fixing @mathias - seems like a basic thing that should ‘just work’.

Thanks for the replies Giovanni and Andreas.

Regards

Tim



Greetings,

Andreas


Am 22.03.19 um 15:26 schrieb Giovanni Manghi:

I am using a value map lookup to let the user select a month on a form. I used the ‘Load Data from Layer option and the months are displayed in a somewhat random looking order. Is there any trick to getting the values to display in ascending order of the key? Or is this a bug?

Hi Tim,
is a long standing bug.

cheers!

-- G --

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net


_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Sort order for Value Map widget values

Matthias Kuhn 🌍

Hi,

Since QGIS 3, the configuration is already stored as list (ordered) and no longer as map (unordered) like in QGIS 2. So it should mostly be there.

What's missing apparently is that the "load the values from CSV" button does not preserve the order.

I can have a look at that in a bugfixing sprint.

Meanwhile you can type the values manually instead of loading them from CSV as a workaround

Matthias

On 3/22/19 4:21 PM, Tim Sutton wrote:
Hi



On 22 Mar 2019, at 15:04, Andreas Neumann <[hidden email]> wrote:

Hi,

The alternative (workaround) is to put your values in another table and link them through a shared key. Then the sorting works fine. Also the relation reference widget (which requires a relation) sorts values fine.



Yeah I tried that, the problem is I want to reference the lookup list from the same table:

Flowering_month -> months table
Fruiting_month -> months table
Pruning_month -> months table

If I try to use the relation system for that the months table is removed as a relatable table after it has been used once (another bug maybe)?

Of course this doesn't mean the bug in the value map shouldn't be fixed. You can ask a developer familiar with the widgets (e.g. Matthias or someone else familiar with the widgets) to fix it, as part of our bug fixing program.



Yeah it would db great if you could fix that next time you are doing paid bug fixing @mathias - seems like a basic thing that should ‘just work’.

Thanks for the replies Giovanni and Andreas.

Regards

Tim



Greetings,

Andreas


Am 22.03.19 um 15:26 schrieb Giovanni Manghi:

I am using a value map lookup to let the user select a month on a form. I used the ‘Load Data from Layer option and the months are displayed in a somewhat random looking order. Is there any trick to getting the values to display in ascending order of the key? Or is this a bug?

Hi Tim,
is a long standing bug.

cheers!

-- G --

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer








Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net


_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Matthias Kuhn
[hidden email]
<a href="tel:+41764356763">+41 (0)76 435 67 63

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Sort order for Value Map widget values

andreaerdna
Matthias Kuhn 🌍 wrote
> What's missing apparently is that the "load the values from CSV" button
> does not preserve the order.

Could the issue report #19299 '"Attribute Table" rows open randomly
ordered?' https://issues.qgis.org/issues/19299 be related to this?

Regards

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer