dbTalk Databases Forums  

Finding the portal row which was just created

comp.databases.filemaker comp.databases.filemaker


Discuss Finding the portal row which was just created in the comp.databases.filemaker forum.



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

Default Finding the portal row which was just created - 10-06-2011 , 10:55 AM






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

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

Default Re: Finding the portal row which was just created - 10-06-2011 , 07:12 PM






In article
<65d4695c-80e7-43ab-9ca6-bcff4d6d533e (AT) n15g2000vbn (DOT) googlegroups.com>, Rob
<robdsteward (AT) gmail (DOT) com> wrote:

Quote:
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!
One instant thought: why not have the user just enter the new details on
the Activity layout instead of in the Portal?

The brute-force Script method would be to copy the Record ID when on the
Activity Layout, and then loop through the Portal rows until you find the
row with the same Record ID.

I doubt it will work, but you could try a Script that copies the Current
Portal Row number when looking at the Activity layout, before returning to
the Client layout, and then Go To that Portal row.

Helpful Harry )

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

Default Re: Finding the portal row which was just created - 10-10-2011 , 07:08 PM



On 7/10/11 2:25 AM, Rob wrote:
Quote:
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...

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.