dbTalk Databases Forums  

FM7 'newbie script' problem

comp.databases.filemaker comp.databases.filemaker


Discuss FM7 'newbie script' problem in the comp.databases.filemaker forum.



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

Default FM7 'newbie script' problem - 07-20-2004 , 12:43 PM






Simple FM7 solution:

Three related tables:

1) Customers (custid, custname)
2) Sites (siteid, custid, sitename)
3) Transaction (transactionid, siteid, transactiontype)

Two Relationships
1) transaction:siteid = sites:siteid
2) sites:custid = customers:custid

On a layout displaying records from transactions I show 'sitename' and
custname.

On a layout in sites, I have a button that launches a script:

Button : Perform Script "New Transaction": Parameter = siteid

Script: New Transaction

goto layout transactions
new record/request
setfield siteid=get(ScriptParameter)
Commit Records
--

When I run it, the Site Name shows up, but the Customer name doesn't.
If I close the file and open it the Customer Name then shows up. If I
perform a find, it will find the record, even though it won't show the
related value. If I manually go into the transaction:siteid and
copy/paste the id back in it shows up. And if I rewrite the script as
below with an extra commit records it works.

What I don't understand is why. What is going on?


Script: New Transaction

goto layout transactions
new record/request
Commit Records
setfield siteid=get(ScriptParameter)
Commit Records

Thanks,

Reply With Quote
  #2  
Old   
Lynn allen
 
Posts: n/a

Default Re: FM7 'newbie script' problem - 07-20-2004 , 01:07 PM






42 <42 (AT) nospam (DOT) com> wrote:

Quote:
What I don't understand is why. What is going on?
Refreshing (or initial appearance) of related values, isn't all that it
should be in FM 7. We're looking for another bug fix soon that will
address this issue as it has a lot of effects in portal refreshing as
well.

Try, after your final Commit Record, going to Preview mode, then back to
Browse mode. This forces a screen re-draw that usually refreshes the
related values.

Lynn Allen
---
www.semiotics.com



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

Default Re: FM7 'newbie script' problem - 07-20-2004 , 01:59 PM



Lynn allen wrote:

Quote:
42 <42 (AT) nospam (DOT) com> wrote:


What I don't understand is why. What is going on?


Refreshing (or initial appearance) of related values, isn't all that it
should be in FM 7. We're looking for another bug fix soon that will
address this issue as it has a lot of effects in portal refreshing as
well.

Try, after your final Commit Record, going to Preview mode, then back to
Browse mode. This forces a screen re-draw that usually refreshes the
related values.

Lynn Allen
---
www.semiotics.com

It seems unbeleiveable that this would have gone gold like that. It
seems such a simple and obvious scenario that I would have thought it
would have come up. Oh well.

One thing I did notice that was that advancing and retreating records,
which I would have though would have forced a refresh did -not- work,
nor did the refresh window script step.

Thanks for the preview-browse hack tip.

Am I safe in assuming that its strictly a 'display' issue then? Do I
have to be worried about the values not being there when scripts access
the values? Or am I going to be injecting preview-browse junk everywhere
I set key fields just to be safe?


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

Default Re: FM7 'newbie script' problem - 07-20-2004 , 02:07 PM



42 wrote:

Quote:
Lynn allen wrote:

42 <42 (AT) nospam (DOT) com> wrote:


What I don't understand is why. What is going on?



Refreshing (or initial appearance) of related values, isn't all that it
should be in FM 7. We're looking for another bug fix soon that will
address this issue as it has a lot of effects in portal refreshing as
well.

Try, after your final Commit Record, going to Preview mode, then back to
Browse mode. This forces a screen re-draw that usually refreshes the
related values.

Lynn Allen
---
www.semiotics.com



It seems unbeleiveable that this would have gone gold like that. It
seems such a simple and obvious scenario that I would have thought it
would have come up. Oh well.

One thing I did notice that was that advancing and retreating records,
which I would have though would have forced a refresh did -not- work,
nor did the refresh window script step.

Thanks for the preview-browse hack tip.

Am I safe in assuming that its strictly a 'display' issue then? Do I
have to be worried about the values not being there when scripts access
the values? Or am I going to be injecting preview-browse junk everywhere
I set key fields just to be safe?
Just more follow up. The preview-browse didn't work. If I go into
preview I can see the values, but when I go back to browse mode they
vanish again =(.

Thoughts?


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

Default Re: FM7 'newbie script' problem - 07-20-2004 , 02:12 PM



42 wrote:

Quote:
42 wrote:

Lynn allen wrote:

42 <42 (AT) nospam (DOT) com> wrote:


What I don't understand is why. What is going on?




Refreshing (or initial appearance) of related values, isn't all that it
should be in FM 7. We're looking for another bug fix soon that will
address this issue as it has a lot of effects in portal refreshing as
well.

Try, after your final Commit Record, going to Preview mode, then back to
Browse mode. This forces a screen re-draw that usually refreshes the
related values.

Lynn Allen
---
www.semiotics.com




It seems unbeleiveable that this would have gone gold like that. It
seems such a simple and obvious scenario that I would have thought it
would have come up. Oh well.

One thing I did notice that was that advancing and retreating records,
which I would have though would have forced a refresh did -not- work,
nor did the refresh window script step.

Thanks for the preview-browse hack tip.

Am I safe in assuming that its strictly a 'display' issue then? Do I
have to be worried about the values not being there when scripts
access the values? Or am I going to be injecting preview-browse junk
everywhere I set key fields just to be safe?


Just more follow up. The preview-browse didn't work. If I go into
preview I can see the values, but when I go back to browse mode they
vanish again =(.

Thoughts?
Still more follow up. The preview-browse didn't work, and I don't see
the values in preview mode either. (It was jumping to the first record
of the found set when i enter preview, which did have values, so I
mistook it for working...)

=(


Reply With Quote
  #6  
Old   
Kevin Hayes
 
Posts: n/a

Default Re: FM7 'newbie script' problem - 07-20-2004 , 02:20 PM



42 wrote:


Quote:
Just more follow up. The preview-browse didn't work. If I go into
preview I can see the values, but when I go back to browse mode they
vanish again =(.

Thoughts?
Are you sure you are displaying the field from the correct relation? Is
it possible that you have a different TOG from the same table, and are
displaying the field in that context?


Reply With Quote
  #7  
Old   
Robbedoes
 
Posts: n/a

Default Re: FM7 'newbie script' problem - 07-20-2004 , 02:28 PM



42 <42 (AT) nospam (DOT) com> schreef
in news:E8eLc.64877$Mr4.7083@pd7tw1no:

Quote:
42 wrote:
42 wrote:
Lynn allen wrote:
42 <42 (AT) nospam (DOT) com> wrote:
What I don't understand is why. What is going on?
Refreshing (or initial appearance) of related values, isn't all
that it should be in FM 7. We're looking for another bug fix soon
that will address this issue as it has a lot of effects in portal
refreshing as well.

Try, after your final Commit Record, going to Preview mode, then
back to Browse mode. This forces a screen re-draw that usually
refreshes the related values.
It seems unbeleiveable that this would have gone gold like that. It
seems such a simple and obvious scenario that I would have thought
it would have come up. Oh well.

One thing I did notice that was that advancing and retreating
records, which I would have though would have forced a refresh did
-not- work, nor did the refresh window script step.

Thanks for the preview-browse hack tip.

Am I safe in assuming that its strictly a 'display' issue then? Do I
have to be worried about the values not being there when scripts
access the values? Or am I going to be injecting preview-browse junk
everywhere I set key fields just to be safe?


Just more follow up. The preview-browse didn't work. If I go into
preview I can see the values, but when I go back to browse mode they
vanish again =(.

Thoughts?

Still more follow up. The preview-browse didn't work, and I don't see
the values in preview mode either. (It was jumping to the first record
of the found set when i enter preview, which did have values, so I
mistook it for working...)
Are you using FM 7.0V2?

--
Robbedoes.

Als de ene hand de andere wast worden ze beide schoon.




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

Default Re: FM7 'newbie script' problem - 07-20-2004 , 03:04 PM



Robbedoes wrote:
Quote:
42 <42 (AT) nospam (DOT) com> schreef
in news:E8eLc.64877$Mr4.7083@pd7tw1no:


42 wrote:

42 wrote:

Lynn allen wrote:

42 <42 (AT) nospam (DOT) com> wrote:

What I don't understand is why. What is going on?

Refreshing (or initial appearance) of related values, isn't all
that it should be in FM 7. We're looking for another bug fix soon
that will address this issue as it has a lot of effects in portal
refreshing as well.

Try, after your final Commit Record, going to Preview mode, then
back to Browse mode. This forces a screen re-draw that usually
refreshes the related values.

It seems unbeleiveable that this would have gone gold like that. It
seems such a simple and obvious scenario that I would have thought
it would have come up. Oh well.

One thing I did notice that was that advancing and retreating
records, which I would have though would have forced a refresh did
-not- work, nor did the refresh window script step.

Thanks for the preview-browse hack tip.

Am I safe in assuming that its strictly a 'display' issue then? Do I
have to be worried about the values not being there when scripts
access the values? Or am I going to be injecting preview-browse junk
everywhere I set key fields just to be safe?


Just more follow up. The preview-browse didn't work. If I go into
preview I can see the values, but when I go back to browse mode they
vanish again =(.

Thoughts?

Still more follow up. The preview-browse didn't work, and I don't see
the values in preview mode either. (It was jumping to the first record
of the found set when i enter preview, which did have values, so I
mistook it for working...)


Are you using FM 7.0V2?

FM Dev 7.0v2


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

Default Re: FM7 'newbie script' problem - 07-20-2004 , 03:11 PM



Kevin Hayes wrote:

Quote:
42 wrote:



Just more follow up. The preview-browse didn't work. If I go into
preview I can see the values, but when I go back to browse mode they
vanish again =(.

Thoughts?


Are you sure you are displaying the field from the correct relation? Is
it possible that you have a different TOG from the same table, and are
displaying the field in that context?

Quite sure, I think, though I don't know what "TOG" is.

There are only 3 tables (& only 3 table instances), and 2 relationships,
as specified in the original post.

As I said in my original post, closing the file and re-opening it causes
the missing data to magically appear, as does manually typing the key
value into the key field (instead of using setfield or insert calculated
result -- i tried both to no effect.)

(To amend another persons comment about version, the file was initially
created in fm7.0v1, if that is an issue, but i am now using fm dev
7.0v2, as I tried the upgrade when it wasn't working, before my first post.



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.