Re: [QGIS-Australia-User-Group] Digest for australian-qgis-user-group@googlegroups.com - 1 update in 1 topic

9 views
Skip to first unread message

Andrew James

unread,
Sep 23, 2025, 6:11:35 PM (2 days ago) Sep 23
to australian-qg...@googlegroups.com
Say, for example

if(
    "PSD_Queries_Notes" != '' OR
    "PSD_Queries_QueryFollowUp" != '' OR
    "PSD_Queries_Servicing" != '' OR
    "PSD_Queries_Query_JL" != '',
    '<b>' || "PSD_Queries_AssetDescription" || '</b>' ||
    if("PSD_Queries_Notes" != '', '<p>- ' || "PSD_Queries_Notes" || '</p>', '') ||
    if("PSD_Queries_QueryFollowUp" != '', '<p>- ' || "PSD_Queries_QueryFollowUp" || '</p>', '') ||
    if("PSD_Queries_Servicing" != '', '<p>- ' || "PSD_Queries_Servicing" || '</p>', '') ||
    if("PSD_Queries_Query_JL" != '', '<p>- ' || "PSD_Queries_Query_JL" || '</p>', ''),
    ''  -- If all are empty, show nothing
)

Not elegant, but it works!

Colin, I'll try your method next, 

Thanks everyone,
Andrew

On Mon, 22 Sept 2025 at 19:04, <australian-qg...@googlegroups.com> wrote:
Andrew James <andrewfra...@gmail.com>: Sep 22 10:39AM +1000

Thanks Em,
 
The links were helpful.
 
Noting a couple of things with your North Road article about HTML labels:
 
 
- H1, H2, H3 tags work as well
- I haven't tested <ul> and <ol> but this would be useful
- HTML formatting breaks any QGIS user styles. This makes page layout
tasks more clunky; more work in design
- Blank labels are created if any field in a list is NULL; so one needs
to go and create some conditional expressions in the midst of that HTML.
This is a hassle.
 
Thank you though, this is a good way to style labels for us.
Andrew
 
 
 
You have received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to australian-qgis-use...@googlegroups.com.

Colin Mazengarb

unread,
Sep 24, 2025, 10:23:50 AM (22 hours ago) Sep 24
to australian-qg...@googlegroups.com
Andrew, a further thought about handling null values in fields. Consider using the coalesce or the concat functions if you haven’t already. It may simplify the code somewhat.
Cheers 
Colin 

Sent from my iPad

On 24 Sep 2025, at 12:11 am, Andrew James <andrewfra...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "QGIS Australia User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to australian-qgis-use...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/australian-qgis-user-group/CAAqwi9RtFtpHT57HXuOf%2BcrgqV3UQikf4hhN_QwQY0-Gh-Vz8w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages