![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello Is ther a way to calculate the nr of the portal row. Thanks Jan |
#3
| |||
| |||
|
|
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 ? |
#4
| |||
| |||
|
|
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 ? |
#5
| |||
| |||
|
|
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 - |
#6
| |||
| |||
|
|
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 |
#7
| |||
| |||
|
|
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 ... |
#8
| |||
| |||
|
|
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? |
)
#9
| |||
| |||
|
|
"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 * ) |
#10
| |||
| |||
|
|
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. |
(
)![]() |
| Thread Tools | |
| Display Modes | |
| |