Skip to content
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

representation for Checked state doesn't work for boolean widgets #22205

Closed
qgib opened this issue Jan 30, 2016 · 5 comments
Closed

representation for Checked state doesn't work for boolean widgets #22205

qgib opened this issue Jan 30, 2016 · 5 comments
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 30, 2016

Author Name: Tudor Bărăscu (@tudorbarascu)
Original Redmine Issue: 14203
Affected QGIS version: 2.12.2
Redmine category:attribute_table


I'm trying to add a Postgis layer that has columns with boolean values and I want to display each of them using different values, e.g. Active - Inactive, Yes - No etc.

By making the settings in the "representation for check state" area, I noticed that they aren't propagated to the table and I only see 't' and 'f'.

There is however a time when the values I've setup appear.. when I click the value in the attribute table..

As a workaround I can setup a value map type of widget, but that messes up the custom ui's for those who use them (and I do).

I tested with master and 2.12.3 on Debian Stretch

@qgib
Copy link
Contributor Author

qgib commented Feb 1, 2016

Author Name: Tudor Bărăscu (@tudorbarascu)


  • fixed_version_id was configured as Version 2.14

@qgib
Copy link
Contributor Author

qgib commented Feb 1, 2016

Author Name: Giovanni Manghi (@gioman)


what is the datatype of the columns your are using for the boolean widget?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 1, 2016

Author Name: Tudor Bărăscu (@tudorbarascu)


Hi Giovanni,

It's boolean (I already wrote that in the issue definition).
My expectations were/are: for a boolean field, I can setup whatever is displayed in the attribute table etc. for the True and for False values.
Am I having wrong expectations?

If so, what is the purpose for the "representation for Checked state" of the checkbox widget.

Tested on Windows also and QGIS 2.8.6.1

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Giovanni Manghi (@gioman)


Hi Tudor,

Am I having wrong expectations?

yes. If the datatype is boolean then the only thing you can write into the column is t/f. You can use other datatypes and the "boolean" edit widget to have the users write whatever you want using the checkbox in the qgis table of attributes.


  • resolution was changed from to invalid
  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Feb 2, 2016

Author Name: Tudor Bărăscu (@tudorbarascu)


Thanks for the info, it's clear now.

From my perspective, as the widget knows it has a boolean field, I could set it up to display anything I wanted as behind the scenes it would have saved 't' and 'f'.

It's a nice to have feature then.

All the best!

Tudor

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Attribute Table labels May 25, 2019
@qgib qgib added this to the Version 2.14 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant