Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #2061

Re: Processing Portal Data in a Script

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: Processing Portal Data in a Script
Date Tue, 10 Mar 2015 13:13:51 +1300
Organization Aioe.org NNTP Server
Lines 60
Message-ID <100320151313514318%HelpfulHarry@BusyWorking.com> (permalink)
References <1m10vq4.1wio5y81i39lq2N%csampson@inetworld.net>
NNTP-Posting-Host Nr0gxwbjpfO0VwUm6rQjGA.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Thoth/1.8.4 (Carbon/OS X)
X-Notice Filtered by postfilter v. 0.8.2
X-Face vIZzK[X\z-._]-_:U?l@cBtwg<{a>ggn\mH}Vs>38E,#R%7h%U0'=4;1Q=erO %[T#a{YJfGvAbWmE@f_h]<rQ30+q;vqA^FUVx%\9{@r{gt${p^.L~bemFF@WY$r9fhuA F"1)$0+MgN+j8OO<SAec%$P;!M4Aj/kVitK5\xKmed-/3$2LiT1nI!-lKjt0B!qP_E{V ja+\#+[_uq8",IkoIF3M0}}qCD(&
Xref csiph.com comp.databases.filemaker:2061

Show key headers only | View raw


In article <1m10vq4.1wio5y81i39lq2N%csampson@inetworld.net>, Charles H.
Sampson <csampson@inetworld.net> wrote:

> What is the process for processing data from a portal in a script when
> there's the possibility that there are no linked records? I'm using Go
> To Portal Row (First) and then asking if I'm at row 0. If I'm not, then
> I loop through the portal rows using Go To Record/Request/Page (Next)
> with Exit On Last. Things aren't working so using some carefully placed
> Show Custom Dialogs I find that I am indeed at portal row 0 when I enter
> the loop if the portal does have linked records. Here's a fragment to
> try to make that clear.
> 
> Go to Layout ["Layout With Portal"; Main Data]
> Go to Record/Request/Page [First]
> If [Get (PortalRowNumber) /= 0]
> # Here's where my Custom Dialog with Get (PortalRowNumber) goes.
> # It shows that the row number is 0 if there are portal rows.
>    Loop
>       ... Stuff that might take me away from Layout With Portal.
>       Go to Layout ["Layout With Portal"; Main Data]
>       Go to Portal Row [Next; Exit after last]
>    End Loop
> End If
> 
> Please forgive any typos. While waiting for responses, I'll be looking
> for pilot error.
> 
> I'm still using FMP8. My ancient desktop is showing signs of age and I'm
> frantically converting old databases from Reflex Plus to FMP before it
> completely dies and I have to move to a new machine.

I'm guessing that "/=" is simply your way of retyping "not equal"
within the confines of the text-based Newsgroups since it won't work in
FileMaker itself. (You can use "<>" instead, which also works in
FileMaker.)

There are various ways to test if there are not any related records:

    - Count(Relationship::KeyField) = 0

    - Relationship::KeyField = ""

    - IsEmpty(Relationship::KeyField)

It's probably best to use a Portal is set to NOT allow creation of
related records, otherwise going to the Portal may create a related
record. You could instead use any related field that you know cannot be
empty for real related record.

If you leave the Layout with the Portal, then FileMaker may exit the
Portal and lose track of where it was. Depending on what you're doing,
it may be better to run the script in the Related file / table itself
by first going to that and finding / showing only the related records.


As a side note, if you've got more than one Portal on the Layout, then
you need to make sure you're in the correct Portal - usually that's
easiest done by going to the Relationship::FieldInPortal

Helpful Harry  :o)

Back to comp.databases.filemaker | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Processing Portal Data in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-09 15:40 -0700
  Re: Processing Portal Data in a Script Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-03-10 13:13 +1300
    Re: Processing Portal Data in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-12 10:39 -0700
      Re: Processing Portal Data in a Script Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-03-13 16:32 +1300
      Re: Processing Portal Data in a Script Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2015-03-12 20:58 -0700
  Re: Processing Portal Data in a Script clkaufmann@gmx.ch (Christoph Kaufmann) - 2015-03-10 07:42 +0100
    Re: Processing Portal Data in a Script Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2015-03-10 11:30 -0700

csiph-web