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

Filter "is_selected()" for atlas print does not work #2076

Closed
meyerlor opened this issue Aug 12, 2021 · 6 comments
Closed

Filter "is_selected()" for atlas print does not work #2076

meyerlor opened this issue Aug 12, 2021 · 6 comments

Comments

@meyerlor
Copy link

meyerlor commented Aug 12, 2021

To enable the field workers to print a PDF from QField, i created a print layout. A virtual column ("Selected") with the expression "is_selected()" was introduced and the atlas option in the layout form is set to Filter by: "Selected=1", so only selected features will be printed (with QGIS atlas enabled). In QGIS this works fine, QField seems not to evaluate the expression (if i select multiple features via "toggle feature selection" none of them shows selected=1), therefore the atlas print does not work.

Is there another way to get multiple printed pages with the same layout out of QField? If i create a print layout without atlas function (basically a better screenshot) it will always export it as "Documents/Formular.pdf", ergo overwriting the previous export.

QField 1.9.6, QGIS 3.16.9

@signedav
Copy link
Member

Yes, it's possible to print an atlas. For the naming you can use expressions in your layout's settings:

atlasnaming

The filter "is_selected()" does not work in QField since the way of selecting features is a different one on the mobile UX. But it should be well possible by just selecting them (with the mentioned "toggle feature selection" function) and then use "Print Atlas Feature(s) to PDF"

See for more information about this feature #1731

@meyerlor
Copy link
Author

ah well, that solved it - thank you!

@GlaDal
Copy link

GlaDal commented Dec 7, 2022

Hi signedav,

According to your message from the Aug 12, 2021, it seems possible to define the name of a pdf with an expression. On my side, it doesn't work (with version 2.5.6). This functionality is not more supported or I'm doing wrong somewhere ?
Thanks by advance.

@signedav
Copy link
Member

signedav commented Dec 8, 2022

Can you provide more information. What is your pdf named like?

@GlaDal
Copy link

GlaDal commented Dec 8, 2022

I tried an expression querying three differents fields. It didn't work.
I tried something basic with only $id. It doesn't work.
image
The name's issue from Qfield remains : 'A3_PAYSAGE-20221208_093751' ('A3_PAYSAGE' is the name of my layout. The rest is obviously the date and hour.
I precise : there is only one feature selected to print.
Thanks

@GlaDal
Copy link

GlaDal commented Dec 12, 2022

I can't reproduce the problem. I bugged. Sorry for the trouble.
It works ! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants