dbTalk Databases Forums  

Portal filtering - v10 Advanced

comp.databases.filemaker comp.databases.filemaker


Discuss Portal filtering - v10 Advanced in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Keith
 
Posts: n/a

Default Portal filtering - v10 Advanced - 01-14-2011 , 10:20 AM






Hello to everybody,

I have a question concerning something I thought would be very easy to
do & need some help because of my misconception.

I'll try to explain with a simplified example :

- 2 tables : Clients & Lines

- One client may have many records in the lines table. They are linked
by an idclient. These records must have something different in each
record. The name, a phone number, etc. but may not have all of the
data exactly the same.

- 1 Portal : if I want to show the different clients for the current
record from the Lines table, I simply go into a global pop-up & choose
'current' & it becomes filled with data from all of the related
records from the Lines table based on the same id client.
- My question : how can I show a list of all of the clients in the
client line file - maybe by choosing 'All' from the pop-up.

If my explanation is not clear, please ask your question, I must have
this done by Monday !

Thanks in advance - Keith

Reply With Quote
  #2  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-14-2011 , 11:04 AM






Keith <francois7675 (AT) gmail (DOT) com> wrote:

Quote:
- My question : how can I show a list of all of the clients in the
client line file
The simplest way is to place a table occurance of the clients table on
your relation graph and create list layout based on that TO, got to that
layout in browse mode and show all records.

If you're operating from a portal or something on a TO that's based on
the lines table, create a relation to the clients with the "x" instead
of the "=" symbol, the "x" means relate anything to anything, i.e. show
all.

As usual, there are more ways, but I have to shut down this computer for
the moment :-)

--
http://clk.ch

Reply With Quote
  #3  
Old   
Keith
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-14-2011 , 12:47 PM



On Jan 14, 11:04*am, c... (AT) tele2 (DOT) ch (Christoph Kaufmann) wrote:
Quote:
Keith <francois7... (AT) gmail (DOT) com> wrote:
- My question : how can I show a list of all of the clients in the
client line file

The simplest way is to place a table occurance of the clients table on
your relation graph and create list layout based on that TO, got to that
layout in browse mode and show all records.

If you're operating from a portal or something on a TO that's based on
the lines table, create a relation to the clients with the "x" instead
of the "=" symbol, the "x" means relate anything to anything, i.e. show
all.

As usual, there are more ways, but I have to shut down this computer for
the moment :-)

--http://clk.ch
Thank you very much for your speedy response.

I'd prefer to stay on the same layout because of what the user must do
with the records in the portal.

If I create a relation to the clients with the "x" instead of the "="
symbol (which I tried) & I choose 'this client' in the pop-up list,
the relationship will still show all of the lines. I'm trying to have
the possibility of using each of the two possibilities by choice.

Thanks again.

Reply With Quote
  #4  
Old   
Keith
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-14-2011 , 12:51 PM



On Jan 14, 12:47*pm, Keith <francois7... (AT) gmail (DOT) com> wrote:
Quote:
On Jan 14, 11:04*am, c... (AT) tele2 (DOT) ch (Christoph Kaufmann) wrote:



Keith <francois7... (AT) gmail (DOT) com> wrote:
- My question : how can I show a list of all of the clients in the
client line file

The simplest way is to place a table occurance of the clients table on
your relation graph and create list layout based on that TO, got to that
layout in browse mode and show all records.

If you're operating from a portal or something on a TO that's based on
the lines table, create a relation to the clients with the "x" instead
of the "=" symbol, the "x" means relate anything to anything, i.e. show
all.

As usual, there are more ways, but I have to shut down this computer for
the moment :-)

--http://clk.ch

Thank you very much for your speedy response.

I'd prefer to stay on the same layout because of what the user must do
with the records in the portal.

If I create a relation to the clients with the "x" instead of the "="
symbol (which I tried) & I choose 'this client' in the pop-up list,
the relationship will still show all of the lines. I'm trying to have
the possibility of using each of the two possibilities by choice.

Thanks again.
I'm sorry, I meant to say 'current' & not 'this client' as the term in
the pop-up.

Reply With Quote
  #5  
Old   
105
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-14-2011 , 02:20 PM



On 15/01/11 2:50 AM, Keith wrote:
Quote:
Hello to everybody,

I have a question concerning something I thought would be very easy to
do& need some help because of my misconception.

I'll try to explain with a simplified example :

- 2 tables : Clients& Lines

- One client may have many records in the lines table. They are linked
by an idclient. These records must have something different in each
record. The name, a phone number, etc. but may not have all of the
data exactly the same.

- 1 Portal : if I want to show the different clients for the current
record from the Lines table, I simply go into a global pop-up& choose
'current'& it becomes filled with data from all of the related
records from the Lines table based on the same id client.
- My question : how can I show a list of all of the clients in the
client line file - maybe by choosing 'All' from the pop-up.

If my explanation is not clear, please ask your question, I must have
this done by Monday !

Thanks in advance - Keith

It is not clear

client to lines is one to many using client_id


If you are on a lines layout, then a line record has only one related
client.


Whatever is the case, as a general construct you can use either a rel to
all client_id , using either a c_1 to c_1 constant based rel, or using
the X operator.

Then either create a value list using the rel to retrieve all client
names and attach to a global (If you use a popup menu rather than a drop
down list you can retrieve client_id while displaying client_name , but
that is probably complicating the issue at this point)

add a script trigger OnObjectModify to the global, to run a script that
goes to the selected Client. Define a script parameter on the script
trigger to parse the client_id from the value list rel

Alternately, place a portal on the layout using the rel to clients, and
a script to go to related record on the portal row i.e. on portal row
object; field, button...). You can then filter the portal by a
clairvoyant search...

Reply With Quote
  #6  
Old   
Keith
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-14-2011 , 03:35 PM



On Jan 14, 2:20*pm, 105 <corti... (AT) internode (DOT) on.net> wrote:
Quote:
On 15/01/11 2:50 AM, Keith wrote:



Hello to everybody,

I have a question concerning something I thought would be very easy to
do& *need some help because of my misconception.

I'll try to explain with a simplified example :

- 2 tables : Clients& *Lines

- One client may have many records in the lines table. They are linked
by an idclient. These records must have something different in each
record. The name, a phone number, etc. but may not have all of the
data exactly the same.

- 1 Portal : if I want to show the different clients for the current
record from the Lines table, I simply go into a global pop-up& *choose
'current'& *it becomes filled with data from all of the related
records from the Lines table based on the same id client.
- My question : how can I show a list of all of the clients in the
client line file - maybe by choosing 'All' from the pop-up.

If my explanation is not clear, please ask your question, I must have
this done by Monday !

Thanks in advance - Keith

It is not clear

client to lines is one to many using client_id

If you are on a lines layout, then a line record has only one related
client.

Whatever is the case, as a general construct you can use either a rel to
all client_id , using either a c_1 to c_1 constant based rel, or using
the X operator.

Then either create a value list using the rel to retrieve all client
names and attach to a global (If you use a popup menu rather than a drop
down list you can retrieve client_id while displaying client_name , but
that is probably complicating the issue at this point)

add a script trigger OnObjectModify to the global, to run a script that
goes to the selected Client. Define a script parameter on the script
trigger to parse the client_id from the value list rel

Alternately, place a portal on the layout using the rel to clients, and
a script *to go to related record on the portal row i.e. on *portal row
object; field, button...). You can then filter the portal by a
clairvoyant search...
Hello & thanks for the reply, I was sure my description was not
clear :

I am on the 'parent' record (Clients) with the portal showing related
records from the 'child' file (lines). The relationship is based on
idclient. There can be many records based on this relationship.

There is a global field with a drop-down list having 2 (custom values)
possibilities : 'current' & 'all'.

The problem I am having is in relating the 2 tables. If I relate them
by 'c_1 to c_1 constant based rel, or using
the X operator' how to filter the portal to show only the line records
for that particular (current) idclient ?

Hope this is clearer -

Reply With Quote
  #7  
Old   
105
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-14-2011 , 04:16 PM



On 15/01/11 8:05 AM, Keith wrote:

Quote:
I am on the 'parent' record (Clients) with the portal showing related
records from the 'child' file (lines). The relationship is based on
idclient. There can be many records based on this relationship.

There is a global field with a drop-down list having 2 (custom values)
possibilities : 'current'& 'all'.

The problem I am having is in relating the 2 tables. If I relate them
by 'c_1 to c_1 constant based rel, or using
the X operator' how to filter the portal to show only the line records
for that particular (current) idclient ?


ok on client record (as would expect)

2 table: Client, ClientLines

to show line items for the client; rel from client to lines using
client_id = client_id, and use this rel for teh main portal (as you
already have)



this still is not clear:
Quote:
The problem I am having is in relating the 2 tables. If I relate them
by 'c_1 to c_1 constant based rel, or using
the X operator' how to filter the portal to show only the line records
for that particular (current) idclient ?
One would normally assume that the status (current, not current) would
be referring to the Client record, not the line item. Therefore one
would be trying to isolate current clients, which is a find type
operation on the Client record set, not the ClientLines.


Client_id is unique in the Clients table - yes?

More generally, to use a filter from tableA to tableB, where tableB is a
lineitem table for tableA
a multiparameter rel is used tableA_id = tableA_id AND tableA::g_filter
= tableB::filter
which requires a second field in tableB

In tableB, a field calculates a multivalue result (this needs to be
indexable, so is best an auto enter calc) eg

If (status = 1; 1 & <pilcrow> & "all" ; 0 & <pilcrow> & "all" (

to return example results:

1
all

or:

0
all



where 1 or 0 is the status for example
so the global on the left side of the rel acts as the switch (values 1, all)

Reply With Quote
  #8  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-15-2011 , 02:30 AM



Keith <francois7675 (AT) gmail (DOT) com> wrote:

Quote:
If I create a relation to the clients with the "x" instead of the "="
symbol (which I tried) & I choose 'this client' in the pop-up list,
the relationship will still show all of the lines.
That's what its meant fore

Quote:
I'm trying to have
the possibility of using each of the two possibilities by choice.
See the posting of 105. My way of doing this: a text global field in the
lines table can hold a clientID (or more client IDs) or the word "All".

The client table gets a calc field, text result, showing:

__kp_ClientID

& ¶ &

"All"

Do _not_ unstore this calc field.

Create a relation by matching these fields with = and you're set. If you
put "All" in your global field in the lines table, it will show all
clients, because the word "All" is in every record.
--
http://clk.ch

Reply With Quote
  #9  
Old   
Keith
 
Posts: n/a

Default Re: Portal filtering - v10 Advanced - 01-15-2011 , 08:47 AM



On Jan 15, 2:30Â*am, c... (AT) tele2 (DOT) ch (Christoph Kaufmann) wrote:
Quote:
Keith <francois7... (AT) gmail (DOT) com> wrote:
If I create a relation to the clients with the "x" instead of the "="
symbol (which I tried) & I choose 'this client' in the pop-up list,
the relationship will still show all of the lines.

That's what its meant fore

I'm trying to have
the possibility of using each of the two possibilities by choice.

See the posting of 105. My way of doing this: a text global field in the
lines table can hold a clientID (or more client IDs) or the word "All".

The client table gets a calc field, text result, showing:

__kp_ClientID

& &

"All"

Do _not_ unstore this calc field.

Create a relation by matching these fields with = and you're set. If you
put "All" in your global field in the lines table, it will show all
clients, because the word "All" is in every record.
--http://clk.ch
I'd like to thank the both of you & to apologize for my unclear
explanation of the problem. After experimenting a bit, I came up with
an answer similar to Christoph Kaufmann's & it's now working very
well.

Corti,

this still is not clear:
Quote:
The problem I am having is in relating the 2 tables. If I relate
them
by 'c_1 to c_1 constant based rel, or using
the X operator' how to filter the portal to show only the line
records
for that particular (current) idclient ?
Without the '¶', it was always finding all of the records because of
the X operator

One would normally assume that the status (current, not current) would
be referring to the Client record, not the line item. Therefore one
would be trying to isolate current clients, which is a find type
operation on the Client record set, not the ClientLines.

Exactly !

Clients : I created a new Auto Enter Text Sorted Field : If( 'choice
field' â‰* "All" ; Id.Client (current) ; "All" )
Lines : I created a new calculation text field 'Automatically create
index as needed' = Id.Client & "¶" & "All"

After relating the above 2 voilÃ* !

When I choose 'Current', the Id.Client is placed in the relationship
field, the same holds true for 'All'

Thanks again

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.