[Solved] Concatenation in "Link slave fields"

Creating and using forms
Post Reply
User avatar
charlie.it
Volunteer
Posts: 417
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

[Solved] Concatenation in "Link slave fields"

Post by charlie.it »

Hi everyone,
in a Form the concatenation "Surname||' '||Name" between mainform and subform in Form Properties "Link slave fields" does not work.
Is there another way of writing it?
Thank you.
Attachments
Schermata 2020-06-04 alle 16.50.31.png
Last edited by charlie.it on Thu Jun 04, 2020 5:29 pm, edited 1 time in total.
charlie
Italian AOO Admin
macOS 14 Sonoma M1: Open Office 4.1.15 - LibreOffice 7.5.7.1

http://www.charlieopenoffice.altervista.org
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Concatenation in "Link slave fields"

Post by Villeroy »

Content type: SQL
Content: SELECT *, "Surname"||' '||"Name" AS "Concat" FROM "Personale"
Link slave fields: "Concat"
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
charlie.it
Volunteer
Posts: 417
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: Concatenation in "Link slave fields"

Post by charlie.it »

I had tried that too, but it didn't work. Obviously I was wrong. Thanks so much.
charlie
Italian AOO Admin
macOS 14 Sonoma M1: Open Office 4.1.15 - LibreOffice 7.5.7.1

http://www.charlieopenoffice.altervista.org
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Concatenation in "Link slave fields"

Post by Villeroy »

If you want to match "Carl" with forename *carl* OR with surname *carl*, you can also use a parameter query:

Code: Select all

SELECT * FROM "Personale"
WHERE UPPER("Surname") LIKE '%' || :pFilter || '%'
  OR UPPER("Forename") LIKE '%' || :pFilter || '%'
Master Field: Filter (field of parent form)
Slave Field: pFilter (named parameter :pFilter)

If your field types are VARCHAR_IGNORECASE, you may drop the UPPER function.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply