dbTalk Databases Forums  

counting portal entries

comp.databases.filemaker comp.databases.filemaker


Discuss counting portal entries in the comp.databases.filemaker forum.



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

Default counting portal entries - 12-06-2005 , 12:13 AM







I wish to get at the number of fields displayed in a portal.
work_order displays a portal into order_assys, a box with a list of
assemblies to be done.
I tried to display a calculated field from the related file
(order_assys:howmany) which is a calculated field containing
status(currentFoundCount)
It always shows the same number.
How do I do this?
(reason being, the window in the portal is small, and having a clue as to
how many entries there are might be valuable)
FP6 windoze
THanks

--
Fritz Oppliger

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

Default Re: counting portal entries - 12-06-2005 , 02:41 AM






Try Count(Order_Assys:AnyField)

"Fritz Oppliger" <fritzo2 (AT) direcwaywithoutallthis (DOT) com> wrote

Quote:
I wish to get at the number of fields displayed in a portal.
work_order displays a portal into order_assys, a box with a list of
assemblies to be done.
I tried to display a calculated field from the related file
(order_assys:howmany) which is a calculated field containing
status(currentFoundCount)
It always shows the same number.
How do I do this?
(reason being, the window in the portal is small, and having a clue as to
how many entries there are might be valuable)
FP6 windoze
THanks

--
Fritz Oppliger



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

Default Re: counting portal entries - 12-06-2005 , 03:44 AM



Like Bill says, except in case it wasn't clear: that should be an
unstored calculation in the PARENT table.

In article <lcydnTiQ79Aj0wjenZ2dnUVZ_tKdnZ2d (AT) comcast (DOT) com>, wjm (AT) wjm (DOT) org
says...
Quote:
Try Count(Order_Assys:AnyField)

"Fritz Oppliger" <fritzo2 (AT) direcwaywithoutallthis (DOT) com> wrote in message
newsp.s1cmrfmv2h3pac (AT) free (DOT) teranews.com...

I wish to get at the number of fields displayed in a portal.
work_order displays a portal into order_assys, a box with a list of
assemblies to be done.
I tried to display a calculated field from the related file
(order_assys:howmany) which is a calculated field containing
status(currentFoundCount)
It always shows the same number.
How do I do this?
(reason being, the window in the portal is small, and having a clue as to
how many entries there are might be valuable)
FP6 windoze
THanks

--
Fritz Oppliger




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

Default Re: counting portal entries - 12-06-2005 , 09:26 AM



Like Bill and Mike say, except one other thing: the calc will only be
correct from the context of the parent record. If you are in one of the
portal field, or even if you just have one of the portal rows
highlighted (by clicking a row outside of a field), then you will be
evaluating the count() from the context of the Order_Assys and will get
the wrong result.

One other thing that was new in FM7 and that many people may not
realize: you can create a Summary type of field in the Order_Assys
table, which itself counts a particular field (I always use my primary
key field -- a serial number field -- because by definition it must
never be empty, which is important for counting). Like your original
calc field, you can place this new summary field on your PARENT layout
and it will properly display the number of related Order_Assys records
that are in the portal. And in this case, the context (whether your
cursor is in the portal or not) doesn't matter.


42 wrote:
Quote:
Like Bill says, except in case it wasn't clear: that should be an
unstored calculation in the PARENT table.

In article <lcydnTiQ79Aj0wjenZ2dnUVZ_tKdnZ2d (AT) comcast (DOT) com>, wjm (AT) wjm (DOT) org
says...
Try Count(Order_Assys:AnyField)

"Fritz Oppliger" <fritzo2 (AT) direcwaywithoutallthis (DOT) com> wrote in message
newsp.s1cmrfmv2h3pac (AT) free (DOT) teranews.com...
I wish to get at the number of fields displayed in a portal.
work_order displays a portal into order_assys, a box with a list of
assemblies to be done.
I tried to display a calculated field from the related file
(order_assys:howmany) which is a calculated field containing
status(currentFoundCount)
It always shows the same number.
How do I do this?
(reason being, the window in the portal is small, and having a clue as to
how many entries there are might be valuable)
FP6 windoze
THanks

--
Fritz Oppliger


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #5  
Old   
Fritz Oppliger
 
Posts: n/a

Default Re: counting portal entries - 12-06-2005 , 10:26 AM



THanks one and all, I got it working.

On Tue, 06 Dec 2005 07:26:24 -0800, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
Like Bill and Mike say, except one other thing: the calc will only be
correct from the context of the parent record. If you are in one of the
portal field, or even if you just have one of the portal rows
highlighted (by clicking a row outside of a field), then you will be
evaluating the count() from the context of the Order_Assys and will get
the wrong result.

One other thing that was new in FM7 and that many people may not
realize: you can create a Summary type of field in the Order_Assys
table, which itself counts a particular field (I always use my primary
key field -- a serial number field -- because by definition it must
never be empty, which is important for counting). Like your original
calc field, you can place this new summary field on your PARENT layout
and it will properly display the number of related Order_Assys records
that are in the portal. And in this case, the context (whether your
cursor is in the portal or not) doesn't matter.


42 wrote:
Like Bill says, except in case it wasn't clear: that should be an
unstored calculation in the PARENT table.
In article <lcydnTiQ79Aj0wjenZ2dnUVZ_tKdnZ2d (AT) comcast (DOT) com>, wjm (AT) wjm (DOT) org
says...
Try Count(Order_Assys:AnyField)

"Fritz Oppliger" <fritzo2 (AT) direcwaywithoutallthis (DOT) com> wrote in message
newsp.s1cmrfmv2h3pac (AT) free (DOT) teranews.com...
I wish to get at the number of fields displayed in a portal.
work_order displays a portal into order_assys, a box with a list of
assemblies to be done.
I tried to display a calculated field from the related file
(order_assys:howmany) which is a calculated field containing
status(currentFoundCount)
It always shows the same number.
How do I do this?
(reason being, the window in the portal is small, and having a clue
as to how many entries there are might be valuable)
FP6 windoze
THanks

-- Fritz Oppliger





--
Fritz Oppliger


Reply With Quote
  #6  
Old   
Helpful Harry
 
Posts: n/a

Default Re: counting portal entries - 12-06-2005 , 09:55 PM



In article <11pbbd2c260gt49 (AT) corp (DOT) supernews.com>, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
Like Bill and Mike say, except one other thing: the calc will only be
correct from the context of the parent record. If you are in one of the
portal field, or even if you just have one of the portal rows
highlighted (by clicking a row outside of a field), then you will be
evaluating the count() from the context of the Order_Assys and will get
the wrong result.
I've never found this problem and it doesn't show up doing a quick test
(Mac, FileMaker 5.5 and 4). It may depend on what field you use from
the related file in the Count function - I always use the key / link
field.

Obviously the Count won't include a new portal row that is still being
entered until that row has actually been exited / saved / committed.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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

Default Re: counting portal entries - 12-07-2005 , 01:20 AM



Helpful Harry wrote:
Quote:
In article <11pbbd2c260gt49 (AT) corp (DOT) supernews.com>, Howard Schlossberg
howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Like Bill and Mike say, except one other thing: the calc will only be
correct from the context of the parent record. If you are in one of the
portal field, or even if you just have one of the portal rows
highlighted (by clicking a row outside of a field), then you will be
evaluating the count() from the context of the Order_Assys and will get
the wrong result.

I've never found this problem and it doesn't show up doing a quick test
(Mac, FileMaker 5.5 and 4). It may depend on what field you use from
the related file in the Count function - I always use the key / link
field.
It's new behavior in FileMaker 7 and 8.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #8  
Old   
Helpful Harry
 
Posts: n/a

Default Re: counting portal entries - 12-07-2005 , 01:47 PM



In article <11pd39ncaust719 (AT) corp (DOT) supernews.com>, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
Helpful Harry wrote:
In article <11pbbd2c260gt49 (AT) corp (DOT) supernews.com>, Howard Schlossberg
howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Like Bill and Mike say, except one other thing: the calc will only be
correct from the context of the parent record. If you are in one of the
portal field, or even if you just have one of the portal rows
highlighted (by clicking a row outside of a field), then you will be
evaluating the count() from the context of the Order_Assys and will get
the wrong result.

I've never found this problem and it doesn't show up doing a quick test
(Mac, FileMaker 5.5 and 4). It may depend on what field you use from
the related file in the Count function - I always use the key / link
field.

It's new behavior in FileMaker 7 and 8.
That would explain why I've never run into it. Seems a silly change
(yet another one) to count just the current portal row - you can do
that in half a second manually, unless the field isn't in the portal
and then you can't see if it's empty / countable. I guess the other
functions like Sum() also work this silly way in the new versions.
(

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.