Groups | Search | Server Info | Login | Register


Groups > comp.databases.filemaker > #430

Re: Finding the portal row which was just created

From cortical <cb@corticaldata.com.au>
Newsgroups comp.databases.filemaker
Subject Re: Finding the portal row which was just created
Date 2011-10-11 10:38 +1030
Organization Aioe.org NNTP Server
Message-ID <j701da$32e$1@speranza.aioe.org> (permalink)
References <65d4695c-80e7-43ab-9ca6-bcff4d6d533e@n15g2000vbn.googlegroups.com>

Show all headers | View raw


On 7/10/11 2:25 AM, Rob wrote:
> Not sure why this seems to elude me...
>
>
> I've got a Clients table related 1-to-many with an Activities table.
>
> I've got a portal showing Activities for the client, sorted by date,
> most recent on top (some dates can also be future).
>
> I've got a script which goes to the Activity layout, creates a new
> Activity, fills it with some default/current information and returns
> to the Client layout.
>
> I would now like to activate a field in the portal row containing the
> Activity which was just created, so that the user can enter the
> details of the Activity.
>
> I'm about to write a brute-force looping script to examine every
> portal row until it finds the right item, but it seems like there
> ought to be something more elegant and/or faster and/or less likely to
> break.
>
> Any thoughts? Thanks in advance!
> -Rob



Entering data in a portal row, especially a quantity of text, is not 
particularly elegant.


Either Set a  global to the primary key of the just created activity 
table, and use a dedictaed edit rel and a new field onthe layout e.g. 
below the portal to display the required related activity field


OR, uses a second , single row iteration of the existing client:;actvity 
rel REL, and filter it for the newly created acitivity_id, by parsing 
the activity_id to a global, or global var ( $$_activity_id).

The second is a clean way to go, add an ONObjectExit script trigger to 
the edit field, in the single row portal, to clear the global, and the 
edit field display magically disappears ( with appropriate field colours)



Add  a script to the portal row to slect the portal row activity_id and 
establish the edit filter and editable fields display. Add a CF object 
to the portal row to display a clour to indicate the record being edited...

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Find similar


Thread

Finding the portal row which was just created Rob <robdsteward@gmail.com> - 2011-10-06 08:55 -0700
  Re: Finding the portal row which was just created yourname@yourisp.com (Your Name) - 2011-10-07 13:12 +1300
  Re: Finding the portal row which was just created cortical <cb@corticaldata.com.au> - 2011-10-11 10:38 +1030

csiph-web