dbTalk Databases Forums  

Nr portal row

comp.databases.filemaker comp.databases.filemaker


Discuss Nr portal row in the comp.databases.filemaker forum.



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

Default Nr portal row - 09-23-2009 , 08:50 AM






Hello

Is ther a way to calculate the nr of the portal row.

Thanks

Jan

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

Default Re: Nr portal row - 09-23-2009 , 09:09 AM






On 23 sep, 09:50, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:
Quote:
Hello

Is ther a way to calculate the nr of the portal row.

Thanks

Jan
There's a fonction for returning the current portal row number: Get
( PortalRowNumber )
is that what you whant ?

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

Default Re: Nr portal row - 09-23-2009 , 09:14 AM



On Sep 23, 4:09*pm, Bizouman <bizou... (AT) gmail (DOT) com> wrote:
Quote:
On 23 sep, 09:50, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:

Hello

Is ther a way to calculate the nr of the portal row.

Thanks

Jan

There's a fonction for returning the current portal row number: *Get
( PortalRowNumber )
is that what you whant ?
Yes but it returns always 0 ?

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

Default Re: Nr portal row - 09-23-2009 , 09:16 AM



On 23 sep, 10:14, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:
Quote:
On Sep 23, 4:09*pm, Bizouman <bizou... (AT) gmail (DOT) com> wrote:

On 23 sep, 09:50, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:

Hello

Is ther a way to calculate the nr of the portal row.

Thanks

Jan

There's a fonction for returning the current portal row number: *Get
( PortalRowNumber )
is that what you whant ?

Yes but it returns always 0 ?
You will need to explain more the script step your doing or how, when
your using the fonction.

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

Default Re: Nr portal row - 09-23-2009 , 09:22 AM



On Sep 23, 4:16*pm, Bizouman <bizou... (AT) gmail (DOT) com> wrote:
Quote:
On 23 sep, 10:14, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:





On Sep 23, 4:09*pm, Bizouman <bizou... (AT) gmail (DOT) com> wrote:

On 23 sep, 09:50, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:

Hello

Is ther a way to calculate the nr of the portal row.

Thanks

Jan

There's a fonction for returning the current portal row number: *Get
( PortalRowNumber )
is that what you whant ?

Yes but it returns always 0 ?

You will need to explain more the script step your doing or how, when
your using the fonction.- Hide quoted text -

- Show quoted text -
I just made a calculation field where the calculation is Get
( PortalRowNumber )
And I placed the field in the portal.
I can display the portal row numer by placing @@ but y need the number
for a further calculation

Thanks for helping...

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

Default Re: Nr portal row - 09-23-2009 , 09:33 AM



On Sep 23, 4:28*pm, Martin Trautmann <t-... (AT) gmx (DOT) net> wrote:
Quote:
On Wed, 23 Sep 2009 07:22:59 -0700 (PDT), Ultralight wrote:
*I just made a calculation field where the calculation is Get
*( PortalRowNumber )
*And I placed the field in the portal.

And it is an unsaved calculation!?

- Martin
Yes it is ...

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

Default Re: Nr portal row - 09-23-2009 , 09:53 AM



On 23 sep, 10:33, Ultralight <jan.andriess... (AT) gmail (DOT) com> wrote:
Quote:
On Sep 23, 4:28*pm, Martin Trautmann <t-... (AT) gmx (DOT) net> wrote:

On Wed, 23 Sep 2009 07:22:59 -0700 (PDT), Ultralight wrote:
*I just made a calculation field where the calculation is Get
*( PortalRowNumber )
*And I placed the field in the portal.

And it is an unsaved calculation!?

- Martin

Yes it is ...
The @@ return the record number not the portal number, in the portal
will display the record number and it will be the portal number !

and how's your calculation that require the portal row number is use
or trigger ? by clicking on a specific portal row ? or to display a
culaculation based on that portal row ?

JF

Reply With Quote
  #8  
Old   
Your Name
 
Posts: n/a

Default Re: Nr portal row - 09-23-2009 , 08:13 PM



"Martin Trautmann" <t-use (AT) gmx (DOT) net> wrote

Quote:
On Wed, 23 Sep 2009 07:33:23 -0700 (PDT), Ultralight wrote:
On Sep 23, 4:28 pm, Martin Trautmann <t-... (AT) gmx (DOT) net> wrote:
On Wed, 23 Sep 2009 07:22:59 -0700 (PDT), Ultralight wrote:
I just made a calculation field where the calculation is Get
( PortalRowNumber )
And I placed the field in the portal.

And it is an unsaved calculation!?

- Martin

Yes it is ...

Hm, you are right, this does not work properly on my FMP version (9), as
there are some other failing get functions.

So the display unfortunately is garbage. As soon as you do enter the
calculated field, the result will be ok. When you do it within a script,
e.g. triggered by a button within the portal row, everything is fine.
But the displayed value is useless.

Where and how do you need it?
The problem is caused by the misnaming of some of the functions in newer
versions of FileMaker. I have noticed before that they made a few mistakes
when renaming them from "Status" to "Get".

The original function was called "Status(CurrentPortalRow)", with "current"
being the important word - it's the number of the Portal Row that is
currently active / selected, as the Help screen says:
Returns the number of the currently selected portal row. When no
portal row is selected, returns 0.

Obviously if no Portal Row is selected, then the function can't return a
sensible result. This old name of "Current" though is still a little
confusing thanks to being used in other functions that work differently to
this. Perhaps this function should be more precisely called
"Get(ActivePortalRowNumber)" or "Get(SelectedPortalRowNumber).

Really it's a function to be used with Scripts. Even when you force it to
update the on-screen use the results are not accurate anyway - selecting one
row updates that row's Calculation field, but then selecting another row
updates both the previous and newly selected rows with the new row's number.


BUT,
you can use another Status / Get function to easily achieve the result of
numbering Portal Rows. (This is perhaps why the PortalRow function works as
it does.)

Instead of having a Calculation field using the Status(CurrentPortalRow)
function, you should use a Calculation field defined in the related Table
as:

PortalRowNum Calculation, Number Result, Unstored
= Status(CurrentRecordNumber)

(I'm not sure what this function has been renamed to in newer versions of
FileMaker - maybe Get(RecordNumber). It's not the RecordID nor RecordCount
functions.)

As the Help says, this function .
Returns the number of the current record in the current found set.
This value is determined by the relative place of the record in the
found set, and changes depending on the find criteria and the
sort order.

which isn't connected to a "selected" record, so when displayed in a Portal
gives the wanted result of numbering the rows because the Portal displays
the "Found Set" of related records. Also, because this function is
independent of the Found Set's sorting (i.e. the first record will always be
numbered "1" no matter how the records are sorted), the same field can be
used in the Portals of any Relationships to that Table no matter how they
are sorted or unsorted.


Helpful Harry )

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

Default Re: Nr portal row - 09-24-2009 , 03:54 AM



On Sep 24, 3:13*am, "Your Name" <your.n... (AT) isp (DOT) com> wrote:
Quote:
"Martin Trautmann" <t-... (AT) gmx (DOT) net> wrote in message

news:slrnhbl1vv.fe.t-use (AT) ID-685 (DOT) user.individual.de...





On Wed, 23 Sep 2009 07:33:23 -0700 (PDT), Ultralight wrote:
*On Sep 23, 4:28 pm, Martin Trautmann <t-... (AT) gmx (DOT) net> wrote:
On Wed, 23 Sep 2009 07:22:59 -0700 (PDT), Ultralight wrote:
I just made a calculation field where the calculation is Get
( PortalRowNumber )
And I placed the field in the portal.

And it is an unsaved calculation!?

- Martin

*Yes it is ...

Hm, you are right, this does not work properly on my FMP version (9), as
there are some other failing get functions.

So the display unfortunately is garbage. As soon as you do enter the
calculated field, the result will be ok. When you do it within a script,
e.g. triggered by a button within the portal row, everything is fine.
But the displayed value is useless.

Where and how do you need it?

The problem is caused by the misnaming of some of the functions in newer
versions of FileMaker. I have noticed before that they made a few mistakes
when renaming them from "Status" to "Get".

The original function was called "Status(CurrentPortalRow)", with "current"
being the important word - it's the number of the Portal Row that is
currently active / selected, as the Help screen says:
* * * Returns the number of the currently selected portal row. Whenno
* * * portal row is selected, returns 0.

Obviously if no Portal Row is selected, then the function can't return a
sensible result. This old name of "Current" though is still a little
confusing thanks to being used in other functions that work differently to
this. Perhaps this function should be more precisely called
"Get(ActivePortalRowNumber)" or "Get(SelectedPortalRowNumber).

Really it's a function to be used with Scripts. Even when you force it to
update the on-screen use the results are not accurate anyway - selecting one
row updates that row's Calculation field, but then selecting another row
updates both the previous and newly selected rows with the new row's number.

BUT,
you can use another Status / Get function to easily achieve the result of
numbering Portal Rows. (This is perhaps why the PortalRow function works as
it does.)

Instead of having a Calculation field using the Status(CurrentPortalRow)
function, you should use a Calculation field defined in the related Table
as:

* * *PortalRowNum * * Calculation, Number Result, Unstored
* * * * * * * = Status(CurrentRecordNumber)

(I'm not sure what this function has been renamed to in newer versions of
FileMaker - maybe Get(RecordNumber). It's not the RecordID nor RecordCount
functions.)

As the Help says, this function .
* * * Returns the number of the current record in the current foundset.
* * * This value is determined by the relative place of the record in the
* * * found set, and changes depending on the find criteria and the
* * * sort order.

which isn't connected to a "selected" record, so when displayed in a Portal
gives the wanted result of numbering the rows because the Portal displays
the "Found Set" of related records. Also, because this function is
independent of the Found Set's sorting (i.e. the first record will alwaysbe
numbered "1" no matter how the records are sorted), the same field can be
used in the Portals of any Relationships to that Table no matter how they
are sorted or unsorted.

Helpful Harry *)
Thanks this works fine

But if you delete a portal row and create a new one the count is not
correct anymore.

Jan

Reply With Quote
  #10  
Old   
Your Name
 
Posts: n/a

Default Re: Nr portal row - 09-25-2009 , 01:46 AM



"Ultralight" <jan.andriessens (AT) gmail (DOT) com> wrote

On Sep 24, 3:13 am, "Your Name" <your.n... (AT) isp (DOT) com> wrote:
<snip>
Quote:
BUT,
you can use another Status / Get function to easily achieve the result
of
numbering Portal Rows. (This is perhaps why the PortalRow function works
as
it does.)

Instead of having a Calculation field using the Status(CurrentPortalRow)
function, you should use a Calculation field defined in the related
Table
as:
PortalRowNum Calculation, Number Result, Unstored
= Status(CurrentRecordNumber)

(I'm not sure what this function has been renamed to in newer versions
of
FileMaker - maybe Get(RecordNumber). It's not the RecordID nor
RecordCount
functions.)

As the Help says, this function .
Returns the number of the current record in the current found set.
This value is determined by the relative place of the record in the
found set, and changes depending on the find criteria and the
sort order.

which isn't connected to a "selected" record, so when displayed in a
Portal
gives the wanted result of numbering the rows because the Portal
displays
the "Found Set" of related records. Also, because this function is
independent of the Found Set's sorting (i.e. the first record will
always be
numbered "1" no matter how the records are sorted), the same field can
be
used in the Portals of any Relationships to that Table no matter how
they
are sorted or unsorted.

Thanks this works fine

But if you delete a portal row and create a new one the count is not
correct anymore.
It should be correct and works fine in FileMaker 5.5. You may be seeing
another "bug" caused by the silly "Commit" nonsense in newer versions of
FileMaker where records aren't actually saved / updated "properly" like they
used to be in older versions. (

You may need to either move backwards and forwards through the records
(after deleting the Portal Row) to refresh the record / screen, or create a
custom "Delete Row" Script that includes the Commit command. (I vaguely also
recall a Preferences option that puts back the original method of saving
records, but I may have that wrong.)

Helpfull Harry )

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.