[Solved] Concatenation in "Link slave fields"

Creating and using forms

[Solved] Concatenation in "Link slave fields"

Postby charlie.it » Thu Jun 04, 2020 5:01 pm

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
macOS 10.12 Sierra: Open Office 4.1.7 - LibreOffice 6.2.8

http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 366
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

Re: Concatenation in "Link slave fields"

Postby Villeroy » Thu Jun 04, 2020 5:17 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28431
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Concatenation in "Link slave fields"

Postby charlie.it » Thu Jun 04, 2020 5:29 pm

I had tried that too, but it didn't work. Obviously I was wrong. Thanks so much.
charlie
macOS 10.12 Sierra: Open Office 4.1.7 - LibreOffice 6.2.8

http://www.charlieopenoffice.altervista.org
User avatar
charlie.it
Volunteer
 
Posts: 366
Joined: Wed Aug 21, 2013 2:12 pm
Location: Italy

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

Postby Villeroy » Thu Jun 04, 2020 6:44 pm

If you want to match "Carl" with forename *carl* OR with surname *carl*, you can also use a parameter query:
Code: Select all   Expand viewCollapse view
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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28431
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Forms

Who is online

Users browsing this forum: No registered users and 2 guests