dbTalk Databases Forums  

Portal showing the found set

comp.databases.filemaker comp.databases.filemaker


Discuss Portal showing the found set in the comp.databases.filemaker forum.



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

Default Portal showing the found set - 02-19-2007 , 05:13 AM






Hello,

FM8.5
FM Server 8

After the user performs a find, you have a found set. I would like to
show the user, in the same layout:

- An sorted record by record view with arrows to allow the user to
advance to the next record or move to the previous record.
- A portal showing the found set, sorted in the same order as the
record view.
- Clicking a button in the portal would take the user to the selected
record, in the record by record view (the layout is the same, the
found set is the same, the sort order remains; just the displayed
record changes).

How can this be achieved?

Thanks


Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Portal showing the found set - 02-19-2007 , 08:58 AM






Create a new field. PortalRel, which is normally empty.
So the script starts with finding ALLL records and emptying this field
After the script has done it's business add a step to set this field to
something (it is set to something in the found set only)
Create a self-relationship using this field
And use this for your portal.

It is slow, because you need to do a replace twice. As your solution gets
bigger, this will make it slower and slower. But I think it will be perfect
to work with using up to about 100.000 records (on my system anyway).

Keep well, Ursus

"Carlos Pereira" <carlosp- (AT) nnhotmail (DOT) com> schreef in bericht
news:951jt2dh8t1omv2qjishocmvubkkmopvp3 (AT) 4ax (DOT) com...
Quote:
Hello,

FM8.5
FM Server 8

After the user performs a find, you have a found set. I would like to
show the user, in the same layout:

- An sorted record by record view with arrows to allow the user to
advance to the next record or move to the previous record.
- A portal showing the found set, sorted in the same order as the
record view.
- Clicking a button in the portal would take the user to the selected
record, in the record by record view (the layout is the same, the
found set is the same, the sort order remains; just the displayed
record changes).

How can this be achieved?

Thanks




Reply With Quote
  #3  
Old   
Carlos Pereira
 
Posts: n/a

Default Re: Portal showing the found set - 02-19-2007 , 10:00 AM



Thanks Ursus,

I have tried what you mention, using either a loop Set field > Go to
next record, and alternatively using a Replace (slower than Set
field). In either case it is just too slow. I have more than 100.000
records, but this is not exactly the problem, because I tried with
20.000 and it is still slow for my needs. It should be instantaneous,
no delay for the user at all. Besides, there might be record locking
issues while emtying and replacing the field, and I would like to
avoid that possibility completely.

I am sure this should be possible using some trick in FM8.5, but I
just can find one. I would be surprised if this is not common practice
in quite a few solutions.

Any other ideas for accomplishing this without any delay that the user
might experience and avoiding record lockig issues?

TIA

On Mon, 19 Feb 2007 15:58:55 +0100, "Ursus" <ursus.kirk (AT) wanadoo (DOT) nl>
wrote:

Quote:
Create a new field. PortalRel, which is normally empty.
So the script starts with finding ALLL records and emptying this field
After the script has done it's business add a step to set this field to
something (it is set to something in the found set only)
Create a self-relationship using this field
And use this for your portal.

It is slow, because you need to do a replace twice. As your solution gets
bigger, this will make it slower and slower. But I think it will be perfect
to work with using up to about 100.000 records (on my system anyway).

Keep well, Ursus

"Carlos Pereira" <carlosp- (AT) nnhotmail (DOT) com> schreef in bericht
news:951jt2dh8t1omv2qjishocmvubkkmopvp3 (AT) 4ax (DOT) com...
Hello,

FM8.5
FM Server 8

After the user performs a find, you have a found set. I would like to
show the user, in the same layout:

- An sorted record by record view with arrows to allow the user to
advance to the next record or move to the previous record.
- A portal showing the found set, sorted in the same order as the
record view.
- Clicking a button in the portal would take the user to the selected
record, in the record by record view (the layout is the same, the
found set is the same, the sort order remains; just the displayed
record changes).

How can this be achieved?

Thanks



Reply With Quote
  #4  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Portal showing the found set - 02-19-2007 , 11:02 AM



Actually I don't think there is a speedy way to do this in a portal. There
is no Get() function to signal whether a record is in the found set or not.
Relationships have to be built on matching field values. Possibly you could
have a search expression entered into a global, then use Evaluate() to
return a 1 or 0 in a field used as the basis of a relationship.

A workaround would be to make a new window showing the found set in a more
convenient format and align this with the "main" view.

"Carlos Pereira" <carlosp- (AT) nnhotmail (DOT) com> wrote

Quote:
Thanks Ursus,

I have tried what you mention, using either a loop Set field > Go to
next record, and alternatively using a Replace (slower than Set
field). In either case it is just too slow. I have more than 100.000
records, but this is not exactly the problem, because I tried with
20.000 and it is still slow for my needs. It should be instantaneous,
no delay for the user at all. Besides, there might be record locking
issues while emtying and replacing the field, and I would like to
avoid that possibility completely.



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

Default Re: Portal showing the found set - 02-19-2007 , 11:18 AM



On Feb 19, 6:13 am, Carlos Pereira <carlo... (AT) nnhotmail (DOT) com> wrote:
Quote:
Hello,

FM8.5
FM Server 8

After the user performs a find, you have a found set. I would like to
show the user, in the same layout:

- An sorted record by record view with arrows to allow the user to
advance to the next record or move to the previous record.
- A portal showing the found set, sorted in the same order as the
record view.
- Clicking a button in the portal would take the user to the selected
record, in the record by record view (the layout is the same, the
found set is the same, the sort order remains; just the displayed
record changes).

How can this be achieved?

Thanks
One way of doing this is to toss the idea of a portal. Set your
records to display in table or a minimal list view and put record
detail (with navigation arrows, etc) in the header or footer.



Reply With Quote
  #6  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Portal showing the found set - 02-19-2007 , 11:41 AM



Depends on how many records will likely end up in your found set. I
have posted here in the past a custom function that I call
GetFoundSet(). This acts more or less like the List() function that was
introduced in 8.5, but it works on the found set (in addition to working
on related records). You can find the function in this list's archive,
or else you may find something similar at
<http://www.briandunning.com/filemaker-custom-functions/>

Using this function, you could grab all the record IDs pretty quickly
from the found set (assuming it is less then, say, a couple hundred
records), set them into a global text field, and then show your portal
through a relationship from that global field to the record ID field.



Carlos Pereira wrote:
Quote:
Hello,

FM8.5
FM Server 8

After the user performs a find, you have a found set. I would like to
show the user, in the same layout:

- An sorted record by record view with arrows to allow the user to
advance to the next record or move to the previous record.
- A portal showing the found set, sorted in the same order as the
record view.
- Clicking a button in the portal would take the user to the selected
record, in the record by record view (the layout is the same, the
found set is the same, the sort order remains; just the displayed
record changes).

How can this be achieved?

Thanks

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #7  
Old   
Carlos Pereira
 
Posts: n/a

Default Re: Portal showing the found set - 02-19-2007 , 01:45 PM



Thank you all for your replies. It might be a good idea for the next
version of FileMaker to include some kind of funtion to save and
recall found set, that would easily allow to show portals with found
sets. The list view is OK, but not practical in real terms for most
situations where you want a coherent user experience and a nice and
coherent interface.

1.- Thank you Grip.

Quote:
One way of doing this is to toss the idea of a portal. Set your
records to display in table or a minimal list view and put record
detail (with navigation arrows, etc) in the header or footer.
Unfortunately, I cannot really split the screen in different parts. It
will waste most of my screen space in the list view, while allowing
only a minimal space for what it is most important: the record view.
Besides, I would like to place other elements to the right
(navigation). For this, the portal should be part of the layout, not a
layout part. I have also taken a look at the sample in
http://users.tpg.com.au/aoaug/mac_osx.html#filemaker (My example
Filemaker database that simulates the Open Access browse window). This
is more or less what you suggest, but has the inherent problems that
makes it not suitable for what I need.

2.- Thank you Bill.

Quote:
A workaround would be to make a new window showing the found set in a more
convenient format and align this with the "main" view.
I cannot use another window. I have to allow the users to click and
select records, showing them in the central record by record section.
If I create a new window, the users would need at least two click to
do this, and I would need to keep the same found set in two windows
(possible, but not very aesthetical, in my opinion).

3.- Thank you Howard.

On Mon, 19 Feb 2007 09:41:03 -0800, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
Depends on how many records will likely end up in your found set. I
have posted here in the past a custom function that I call
GetFoundSet(). This acts more or less like the List() function that was
introduced in 8.5, but it works on the found set (in addition to working
on related records).
Do you mean this message: " Help show only found set". If not, please
provide me with the link. I have been unable to find your message
using GetFoundSet as search word. There is no similar or any other
Found Set funtion in Dunning's page.

You can find the function in this list's archive,
Quote:
or else you may find something similar at
http://www.briandunning.com/filemaker-custom-functions/

Using this function, you could grab all the record IDs pretty quickly
from the found set (assuming it is less then, say, a couple hundred
records), set them into a global text field, and then show your portal
through a relationship from that global field to the record ID field.
Well, users might have +5.000 records in the found set (not very
likely, but possible). In a more common situation, users might have a
found set of +1.000 records. Would your function work well (fast)
under this conditions? Thanks



Quote:


Carlos Pereira wrote:
Hello,

FM8.5
FM Server 8

After the user performs a find, you have a found set. I would like to
show the user, in the same layout:

- An sorted record by record view with arrows to allow the user to
advance to the next record or move to the previous record.
- A portal showing the found set, sorted in the same order as the
record view.
- Clicking a button in the portal would take the user to the selected
record, in the record by record view (the layout is the same, the
found set is the same, the sort order remains; just the displayed
record changes).

How can this be achieved?

Thanks


Reply With Quote
  #8  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Portal showing the found set - 02-19-2007 , 02:16 PM



My apologies. I have posted my function on some other lists, but I
apparently have not done so here. Nonetheless, you will find a similar
function here: http://www.briandunning.com/cf/439

Carlos Pereira wrote:

Quote:
On Mon, 19 Feb 2007 09:41:03 -0800, Howard Schlossberg
howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Depends on how many records will likely end up in your found set. I
have posted here in the past a custom function that I call
GetFoundSet(). This acts more or less like the List() function that was
introduced in 8.5, but it works on the found set (in addition to working
on related records).

Do you mean this message: " Help show only found set". If not, please
provide me with the link. I have been unable to find your message
using GetFoundSet as search word. There is no similar or any other
Found Set funtion in Dunning's page.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #9  
Old   
Carlos Pereira
 
Posts: n/a

Default Re: Portal showing the found set - 02-20-2007 , 09:57 AM



Thank you Howard.

I have tried the function. It works well when the Foundset contains
just a few records (no more than 300 hundred, I guess). However, when
the found set includes thousand of records (well, in fact 1.000 is
already a problem). takes just too much (more than 30 seconds). I am
not sure whether this issue is related to the the process of filling
the global with the function or with updating the portal, but
whichever it is the cause, the result is not practical in real terms
(a user should not wait more than 5 seconds for a search result, or
else he will start to complain about the program).

I will keep on trying to find a solution for this need of having a
portal and a record by record view.

On Mon, 19 Feb 2007 12:16:07 -0800, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
My apologies. I have posted my function on some other lists, but I
apparently have not done so here. Nonetheless, you will find a similar
function here: http://www.briandunning.com/cf/439

Carlos Pereira wrote:

On Mon, 19 Feb 2007 09:41:03 -0800, Howard Schlossberg
howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Depends on how many records will likely end up in your found set. I
have posted here in the past a custom function that I call
GetFoundSet(). This acts more or less like the List() function that was
introduced in 8.5, but it works on the found set (in addition to working
on related records).

Do you mean this message: " Help show only found set". If not, please
provide me with the link. I have been unable to find your message
using GetFoundSet as search word. There is no similar or any other
Found Set funtion in Dunning's page.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance

Reply With Quote
  #10  
Old   
Carlos Pereira
 
Posts: n/a

Default Re: Portal showing the found set - 02-20-2007 , 10:59 AM



On Tue, 20 Feb 2007 16:57:40 +0100, Carlos Pereira
<carlosp- (AT) nnhotmail (DOT) com> wrote:

Quote:
I am
not sure whether this issue is related to the the process of filling
the global with the function or with updating the portal
Now I am. It is related to finding the portal records and displaying
them. Even if there are more than 5.000 records, the function works
almost instantly. However, refreshing the portal (no matter if it is
limited to just 10 records or so) takes ages. I have tried limiting
the number of records in the portal (adding an extra field to the
relationship, a global that set the maximum value of the child key).
This helps, but it still takes more than 1 minute to display the
records in the portal. The relationship compares all records in the
global field (left side of the relationship) to all records in the key
field (right side of the relationship). This is the problem now. If
you have hundred of records...

Any ideas?

Thanks


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.