Giter Club home page Giter Club logo

Comments (10)

SeqLaz avatar SeqLaz commented on September 4, 2024 1

Hi @SeqLaz

I just looked at the pdf you uploaded maybe I wrote the instructions a little confusing. You used the employees layer but the crew selection actually happens in the "fieldnotes layer". (People usually don't see the Region and Employees layer - both layers are usually invisible)

See the three screenshots below

  1. select Fieldnotes layer and start editing
    IMG_0098
  2. Go to crew tab and select a region. The box on top uses the boolean field and the one at the bottom an integer
    IMG_0099
    IMG_0100

the boolean field combo box remains empty. If you go to the properties of the layer and look at the widget setup both boxes are identical with the only difference that the top one utilizes a boolean type field while the one at the bottom uses an integer

Hello @Meykaefer,

I understand now, the issue is not with QField. The problem lies in the expression you are using. You have used the string 'true' instead of a boolean type. For a boolean, you need to follow the SQL language convention and use True or TRUE, without any quotation. You will notice that in the expression editor, the boolean type is highlighted with a different color than strings. To fix the issue, you just need to change the string to a boolean type.

Test Qfield checkbox boolean field 003.pdf

from qfield.

Meykaefer avatar Meykaefer commented on September 4, 2024 1

Hi @SeqLaz,

Thank you for figuring this out! Nonetheless, I do think something changed somewhere along the line. I have field projects that from December which are set up identical to the sample I provided and I was able to record the crew on site. And once we returned from the winter break it all of a sudden didn't work anymore.

That is the reason I thought it could be a possible regression since something that previously worked stopped working.

Thank you for pointing out the reason and providing a solution!

from qfield.

m-kuhn avatar m-kuhn commented on September 4, 2024

Can you provide a minimal project with as little attributes and layers as possible to reproduce this behavior?

from qfield.

nirvn avatar nirvn commented on September 4, 2024

For the record I suspect it's this upstream regression that got fixed not too long ago:

qgis/QGIS#57060

from qfield.

Meykaefer avatar Meykaefer commented on September 4, 2024

@m-kuhn I made a sample project and attached it here.

The sample project contains an Employee layer with two columns for their active status. One column is a boolean type, and the other is an integer. When you select the fieldnotes layer and create an entry, go to the Crew tab, and select a region in the Team dropdown, the boolean box will remain empty, while the integer box will display values.

Also, this only happens in QField but not in QGis itself.

I hope this helps!

Sample Project.zip

from qfield.

SeqLaz avatar SeqLaz commented on September 4, 2024

@m-kuhn I made a sample project and attached it here.

The sample project contains an Employee layer with two columns for their active status. One column is a boolean type, and the other is an integer. When you select the fieldnotes layer and create an entry, go to the Crew tab, and select a region in the Team dropdown, the boolean box will remain empty, while the integer box will display values.

Also, this only happens in QField but not in QGis itself.

I hope this helps!

Sample Project.zip

In QField v3.2.2 and QGIS v3.36.2, I was unable to reproduce the issue you are experiencing.

Test Qfield checkbox boolean field 002.pdf

from qfield.

Meykaefer avatar Meykaefer commented on September 4, 2024

Hi @SeqLaz

I just looked at the pdf you uploaded maybe I wrote the instructions a little confusing. You used the employees layer but the crew selection actually happens in the "fieldnotes layer". (People usually don't see the Region and Employees layer - both layers are usually invisible)

See the three screenshots below

  1. select Fieldnotes layer and start editing
    IMG_0098

  2. Go to crew tab and select a region. The box on top uses the boolean field and the one at the bottom an integer
    IMG_0099
    IMG_0100

the boolean field combo box remains empty. If you go to the properties of the layer and look at the widget setup both boxes are identical with the only difference that the top one utilizes a boolean type field while the one at the bottom uses an integer

from qfield.

nirvn avatar nirvn commented on September 4, 2024

@Meykaefer , can you try the sample project that stopped working against the APK here: #5216 (comment) ? Thanks

from qfield.

Meykaefer avatar Meykaefer commented on September 4, 2024

@nirvn , I would gladly test the APK, but I don't know how to do it. I only have access to iOS devices, and I don't know how to install this APK. If you have some instructions on what I need to do I can do and test it.

from qfield.

SeqLaz avatar SeqLaz commented on September 4, 2024

Hey @nirvn It is not possible to use a string 'true' as a replacement for a True type value when using the compiled version of QField and the original project shared by @Meykaefer.

Test QField compiled preview checkbox 001.pdf

from qfield.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.