dbTalk Databases Forums  

Small problem with script that avoids blank portal row

comp.databases.filemaker comp.databases.filemaker


Discuss Small problem with script that avoids blank portal row in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jbpollock@gmail.com
 
Posts: n/a

Default Small problem with script that avoids blank portal row - 11-25-2005 , 12:06 PM






Hello all,

I set up a portal and wanted it to work in a way where it wouldn't
create a new blank portal row below the one you were currently
entering. So I did the following:

1) Made the original relationship between the primary and secondary
table unable to create related records
2) Added a new instance of the secondary table and linked the related
field in the secondary table to a global variable in the primary table
3) Wrote a quickie script that a) sets the related field in the new
instance of secondary table equal to the related field in the primary
table, b) sets the related field in the new instance of the secondary
table equal to itself (to refresh), c) does a commit, d) jumps to the
last portal row, and e) sets which field to start in.

The script works, but for some reason I have to click on the script
button twice for it to work. I've put the database up here at
http://jpollock.web.wesleyan.edu/ if someone were able to take a peek
and see if I've done something wrong in the database relationship or
script.

Thanks as always to all the helpful folks who read this forum!


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

Default Re: Small problem with script that avoids blank portal row - 11-25-2005 , 06:53 PM






In article <1132941985.278518.123750 (AT) z14g2000cwz (DOT) googlegroups.com>,
jbpollock (AT) gmail (DOT) com says...
Quote:
Hello all,

I set up a portal and wanted it to work in a way where it wouldn't
create a new blank portal row below the one you were currently
entering. So I did the following:

1) Made the original relationship between the primary and secondary
table unable to create related records
2) Added a new instance of the secondary table and linked the related
field in the secondary table to a global variable in the primary table
3) Wrote a quickie script that a) sets the related field in the new
instance of secondary table equal to the related field in the primary
table, b) sets the related field in the new instance of the secondary
table equal to itself (to refresh), c) does a commit, d) jumps to the
last portal row, and e) sets which field to start in.

The script works, but for some reason I have to click on the script
button twice for it to work. I've put the database up here at
http://jpollock.web.wesleyan.edu/ if someone were able to take a peek
and see if I've done something wrong in the database relationship or
script.

Thanks as always to all the helpful folks who read this forum!


Near as I can tell, your script worked more by coincidence.

I've sent you your sample back in working form.

Couple general comments on what I did:

1) You had a relationship based on a global for the add new records.
That was unnecessary. I modified the relationship to work on the normal
keys. (All you need is two relationships... one allowed to create new
records, and one not.)

2) You must view a portal, and goto the bottom row to create a record
via a portal, you can't just set a field via the relationship... that
only works if they're are NO related records. Once a related record
exists, you just end up edititing it instead of creating a new record.

I modified your script to switch to a utility layout, create the related
record, and switch back.

I sent you the file back via email. Let me know if its doing what you
want now; as I may have mis-understood your post. Please respond via
this newsgroup.

Hope that helps.

-regards,
Dave


Reply With Quote
  #3  
Old   
John Pollock
 
Posts: n/a

Default Re: Small problem with script that avoids blank portal row - 11-26-2005 , 08:59 AM



Dave,

Quote:
Actually, I posted more detailed comments to the newsgroup. Check your
reader again, or pop over to google groups to catch up
It appears to me that Google's news feed to usenet might be broken, as
it shows the last update to comp.databases.filemaker to be yesterday at
8:16 AM. Actually, that's the last update time for any group that I can
see. I've tried viewing google's feed both from google's webpage and
from a separate newsreader, but it's the same issue. Fortunately, I'm
able to use Verizon's news feed instead, which works fine. Anyway,
that's all beside the point.

Thanks very much for your comments and changes to my Filemaker database!
It certainly works properly now. FYI, in terms of the way I had done
it (using the global field to define the secondary relationship, etc), I
was basically following the recommendation of various people on the
'net; it wasn't something I had come up with myself. I actually
wound up copying your method to set up another portal similarly, which
is great.

As always, I am extremely impressed with the caliber of knowledge and
willigness to assist that I've found in this group!

Cheers,
John



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.