dbTalk Databases Forums  

Go to related record creates new record?

comp.databases.filemaker comp.databases.filemaker


Discuss Go to related record creates new record? in the comp.databases.filemaker forum.



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

Default Go to related record creates new record? - 07-26-2003 , 08:22 PM






In a portal I have a button that with Go to related record attached (it
also sets some globals in the related file, and goes to a layout in
there too). The button will create a new record if you click it on the
last portal row.

Does this sound like normal behavior or not? Because I can't duplicate
it. I've got another two portals, and they won't create a new record
from the go to related record function. I can type in the portal row
alright to make a new record, but the button won't do it.

I've spent some hours trying to diagnose this problem. I don't desire
one behavior over the other, I just want it consistent.

Any ideas?

I'm tempted to do away completely with the go to related record
function, because I already pass the related ID field to a global in the
file, in case the user closes the preceding window and makes new
records, so I could just do it the longer way. I'd like to know what I'm
doing for my peace of mind.

Thanks in advance.


Reply With Quote
  #2  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Go to related record creates new record? - 07-27-2003 , 12:37 PM






Your problem is not caused by the Go to Related Record step. More
likely, your script is setting a field in that related file that is not
a global. Since your relationship is set to allow creation of records,
you are inserting data and it is creating the new record for you.

Project Mayhem wrote:
Quote:
In a portal I have a button that with Go to related record attached (it
also sets some globals in the related file, and goes to a layout in
there too). The button will create a new record if you click it on the
last portal row.

Does this sound like normal behavior or not? Because I can't duplicate
it. I've got another two portals, and they won't create a new record
from the go to related record function. I can type in the portal row
alright to make a new record, but the button won't do it.

I've spent some hours trying to diagnose this problem. I don't desire
one behavior over the other, I just want it consistent.

Any ideas?

I'm tempted to do away completely with the go to related record
function, because I already pass the related ID field to a global in the
file, in case the user closes the preceding window and makes new
records, so I could just do it the longer way. I'd like to know what I'm
doing for my peace of mind.

Thanks in advance.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
Associate Member, FileMaker Solutions Alliance



Reply With Quote
  #3  
Old   
Project Mayhem
 
Posts: n/a

Default Re: Go to related record creates new record? - 07-28-2003 , 01:48 AM



Howard Schlossberg wrote:
Quote:
Your problem is not caused by the Go to Related Record step. More
likely, your script is setting a field in that related file that is not
a global. Since your relationship is set to allow creation of records,
you are inserting data and it is creating the new record for you.
My script sets a global number field (a step that doesn't create a new
record in any other file), goes to the related record, then performs a
script in the destination file which simply goes to a layout.

It is the setting of the global in the file. I isolated the bits of the
script and found that out. Why that makes a difference is beyond me,
because I still can't make another portal do this, even though it sets
an identical global from the same source in it's file.

I think I've hit a bug, or corruption in one of the files.

Quote:
Project Mayhem wrote:

In a portal I have a button that with Go to related record attached
(it also sets some globals in the related file, and goes to a layout
in there too). The button will create a new record if you click it on
the last portal row.

Does this sound like normal behavior or not? Because I can't duplicate
it. I've got another two portals, and they won't create a new record
from the go to related record function. I can type in the portal row
alright to make a new record, but the button won't do it.

I've spent some hours trying to diagnose this problem. I don't desire
one behavior over the other, I just want it consistent.

Any ideas?

I'm tempted to do away completely with the go to related record
function, because I already pass the related ID field to a global in
the file, in case the user closes the preceding window and makes new
records, so I could just do it the longer way. I'd like to know what
I'm doing for my peace of mind.

Thanks in advance.




Reply With Quote
  #4  
Old   
Project Mayhem
 
Posts: n/a

Default Re: Go to related record creates new record? - 07-29-2003 , 02:02 AM



Matt Revenaugh wrote:
Quote:
Why not put an if statement into your script? Check to see if the user is
clicking the last, blank row.

Something like:

If(Not IsEmpty(myRelatedFile::itsKeyField))
Go to related record
...
End if
I was just going to have it create a new record in the destination file,
from a script in that file. It already tasks the ID field of the current
file, sets a global of that in the destination file, and any new records
have their related ID field based on that global.

I just don't like knowing there's something in my database that I don't
understand. If this was Access it wouldn't bother me, because I'd have
tried and failed at multiple ways of getting what I want to work until I
succeed. I take a different attitude with Filemaker. I much prefer the
scripting system in Filemaker, I'd like if it had an advanced mode like
Flash though. MS could learn a thing or two, they have two extremes in
VB and Macros, I can't say I like either one.

Quote:
In a portal I have a button that with Go to related record attached (it
also sets some globals in the related file, and goes to a layout in
there too). The button will create a new record if you click it on the
last portal row.

Does this sound like normal behavior or not? Because I can't duplicate
it. I've got another two portals, and they won't create a new record
from the go to related record function. I can type in the portal row
alright to make a new record, but the button won't do it.

I've spent some hours trying to diagnose this problem. I don't desire
one behavior over the other, I just want it consistent.

Any ideas?

I'm tempted to do away completely with the go to related record
function, because I already pass the related ID field to a global in the
file, in case the user closes the preceding window and makes new
records, so I could just do it the longer way. I'd like to know what I'm
doing for my peace of mind.

Thanks in advance.





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.