Issue 12329 - Form / Subform # Link from / Link to -> don't work with more than one parameter
Summary: Form / Subform # Link from / Link to -> don't work with more than one parameter
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: PC Linux, all
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2003-03-14 10:08 UTC by Unknown
Modified: 2017-05-20 10:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

(dBase) database to help to reproduce this (442 bytes, application/zip)
2003-05-30 12:39 UTC, Frank Schönheit
no flags Details
form document for reproducing the bug (6.41 KB, application/octet-stream)
2003-05-30 12:39 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-03-14 10:08:53 UTC
To make the problem reproducible for you i give an example ( I know, that nobody
would do so in reality)

Let's say: in the (main)form we have "maintable" - in the subform we have "subtable"

In the form I have a table with two fields - let's say field_a and field_b
I want to look for them in the subform - let's say subfield_a and subfield_b

In the subform following two constellations are working properly:
select ... from subtable where subfield_a=:a
Link from:  "field_a"
Link to: "a"
select ... from subtable where subfield_b=:b
Link from:  "field_b"
Link to: "b"

Now we change example 2 to 2a
select ... from subtable where subfield_b=:b
Link from:  "field_a";"field_b"
Link to "a";"b"

Example 2a  don't work! ( I know that there is no subfield_a=:a in my where
clause; it's for demonstration. But the former where clause don't  work if it's
parameter is on second place in the list)
So I suppose that only the first parameter is handed over (from the form to the
subform) , but not the second.

I also tried example 2a under StarOffice 5.1 (SUSE Linux). There example 2a works.

Do you know what I mean? Can you reproduce ? Is this a bug ? 

Greetings from Jörg
Comment 1 marc.neumann 2003-03-17 09:00:34 UTC
Hi Frank,

should this work at all and what should happend?

Can you have a look on this. Thanx.

Bye Marc
Comment 2 Unknown 2003-03-18 06:23:45 UTC
Hi Frank and Mark,

in the program-help user can read, that you can use more than one
parameter. (separated by CTRL-RETURN) But if a user do so (like me ;-)
OO crashes and the user does not know why.

If you do not want to implement please don't forget to change
the help and/ro make it unpossible to enter more than one parameter.
In general oo gives not much error messages - the real problem
was hard to find. 

Bye Jörg
Comment 3 Frank Schönheit 2003-03-18 12:45:00 UTC
well, 2a should work, at least I currently (out of my head) can't
imagine any reasons why it should not. Finally, it's just "too much"
information :)

> But if a user do so (like me ;-) OO crashes and the user does not know
> why.

well, crashes are always a Bad Thing (TM), no matter of the
circumstances :)
Comment 4 Frank Schönheit 2003-05-30 12:39:09 UTC
Created attachment 6544 [details]
(dBase) database to help to reproduce this
Comment 5 Frank Schönheit 2003-05-30 12:39:39 UTC
Created attachment 6545 [details]
form document for reproducing the bug
Comment 6 Frank Schönheit 2003-05-30 12:41:12 UTC
the attached zip file contains two dBase tables, which should be
extracted into any directory. Then, create a dBase data source named
"Bibliography" pointing to this directory.
Finally, open the attached bugdoc.sxw, it will work with the two
tables, and show the bug here.

Confirming and accepting.
Comment 7 marc.neumann 2003-09-25 13:28:50 UTC
"According to the roadmap
( this issue was retargeted to
OOo Later."
Comment 8 hans_werner67 2004-02-02 12:33:23 UTC
change subcomponent to 'none'
Comment 9 nossem 2005-08-08 08:50:59 UTC
I wanted to point out another facet of the problems that linking subforms to
forms does not work with more than one parameter.

Consider a database which has two tables, projects and employess and a
relational table linking these tables which stores, say, assignments of
employess to a project for some quarter and to a certain percentage.

The classic DB design to represent this is the following:

                  0   Project 1
                  1   Project 2
                  2   Project 3

                    0  JACK
                    1  JOHN
                    2  JIM

                    0           0    1Q05         80
                    1           0    1Q05         20
                    0           1    1Q05        100
... and so on ...

I would like to build a form, which allows me to select both a project and a
user, and then to enter assignments for this combination of project/user into
the database. 

No matter how you build your form, you will always end up with a query which
requires two parameters to select the correct row of the ASSIGNMENT table. One
parameter is bound to a PROJECT_ID value of the PROJECT table, the other is
bound to an EMPLOYEE_ID of the EMPLOYEE table.

What I observed is that both parameters in the query are set to the same value,
in my case always the project ID value. (I suspect that it is always the value
of the parameter specified first...) 

Note that I was working with version 1.9.122!!!

I strongly suggest to change the priority of this issue to at least P2, because
if it is not possible to build such basic forms using BASE, its usefulness is
very questionable. 

-- markus, looking forward to a quick solution
Comment 10 stanislavl 2005-11-21 19:43:00 UTC
This problem persists in OpenOffice Base 2.0.139
If a "maintable" has a primary key which consists of two columns and a
"subtable" is linked by two columns, then only a value of the first column is
inserted into both columns of the subform.  
For example: main table is keyed by fields "Year" and "ContractNumber". The
value 2005 is inserted into both "Year" and "Contr_num" fields of the subform.
Comment 11 Frank Schönheit 2006-01-09 13:34:00 UTC
The original scenario describe in this issue works fine for me in OOo 2.0.1.
joergf, could you please verify or falsify this?
Comment 12 Marcus 2017-05-20 10:45:19 UTC
Reset the assignee to the default "".