dbTalk Databases Forums  

FM8 odd behavior in scripted copy/paste into pop-up menu fields

comp.databases.filemaker comp.databases.filemaker


Discuss FM8 odd behavior in scripted copy/paste into pop-up menu fields in the comp.databases.filemaker forum.



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

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-15-2005 , 11:43 PM






In article <1132112972.942306.86770 (AT) o13g2000cwo (DOT) googlegroups.com>,
ab (AT) pottnerconsulting (DOT) ca says...
Quote:
I've seen the posts here saying it's a bad idea to use the clipboard
and in theory I agree however I haven't found workarounds for common
tasks such as tagging a set of records when the tag uses a global text
field and a calc that just checks if that records ID is in the global
text field.

Assume you have tables A, B, and C, I find I often have to go to
related records from A to B, omit a set of records and possibly add
others, then go to related records in C.
Prior to FM8 I don't see how this was possible without using copy /
paste and even in 8 it's still easier to copy record IDs into a global
then work on the next batch of IDs then put the 2 sets together and
display the records.
I'm not sure why you'd need copy / paste to move record ids into a
global? Just use set field. This has been available since 3.

Your 'technique' of using the global to store temporary data is fine,
its just that you don't need to use the clipboard to move data to and
from the global.


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

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-15-2005 , 11:48 PM






In article <BF9FEB79.68F85%trashadd (AT) bigfoot (DOT) com>, trashadd (AT) bigfoot (DOT) com
says...
Quote:
On 11/14/05 8:47 PM, in article
MPG.1de3086bc1c2139b989dc2 (AT) shaw....shawcable.net, "42"
nospam (AT) nospam (DOT) com> wrote:
Furthermore, why would you expect *pasting* into a popup menu to work in
the first place? While I'm surprised that it actually crashes, and think
you *have* found a bug, I'm not the least bit surprised that it doesn't
work. Popup menus are designed to allow users to select a value from a
list, with no provision to simply enter arbitrary values. I would have
expected filemaker to ignore your paste step entirely and set an error
condition.


Why would I expect it to work? I dunno, it seemed logical to me that to
paste a value from a known value list from one field to the other, where the
value list is the same in both fields, would not be a problem.
Yeah, I agree, that would be 'reasonable'.

Quote:
Once again,
it wasn't to enter arbitrary values, just to not have to enter the value in
two places.

Why not just display the same field in both places? Because I sometimes have
to change the recipient field to a different value.
I agree there is certainly a need to transfer the value, but set field
with globals is more appropriate for this task than copy/paste.
Quote:
I see your point: a random paste into a menued field should not work, but I
never planned to do that.
Filemaker can't know that.

Quote:
Thanks for the constructive criticism.
The main thing to take away from all this is the alternative technique
of using set field to move the data around, and to define a global to
hold it, essentially building a 'private clipboard field'.


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

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-15-2005 , 11:51 PM



In article <BF9FEA3E.68F83%trashadd (AT) bigfoot (DOT) com>, trashadd (AT) bigfoot (DOT) com
says...
Quote:
I use Copy/paste to keep the format unchanged - Set Field sometimes changes
it to a non-preferred format.
"Insert Calculated Result" is the preferred way of dealing with
formatting issues when set field doesn't do what you want. Like set
field it -doesn't- use the users clipboard, and like copy/paste it
requires a field on the layout to operate on.

Quote:
I didn't know FileMaker was aware of the problem, but it seems to affect the
Windows version only, and only with pop-up menus, not drop-down lists. The
drop-down list seems to remain unaffected when I experimented with it.
FWIW the drop down list SHOULD work, because its defined to take
arbitrary text input.


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

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-16-2005 , 01:20 AM



42 wrote:
Quote:
In article <BF9FEA3E.68F83%trashadd (AT) bigfoot (DOT) com>, trashadd (AT) bigfoot (DOT) com
says...
I use Copy/paste to keep the format unchanged - Set Field sometimes changes
it to a non-preferred format.

"Insert Calculated Result" is the preferred way of dealing with
formatting issues when set field doesn't do what you want. Like set
field it -doesn't- use the users clipboard, and like copy/paste it
requires a field on the layout to operate on.
And in FileMaker 7/8, the calc engine (using Set Field, for example)
will retain formatting.

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

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #15  
Old   
FP
 
Posts: n/a

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-18-2005 , 12:57 AM



42 wrote:
Quote:
Your 'technique' of using the global to store temporary data is fine,
its just that you don't need to use the clipboard to move data to and
from the global.
To loop through 100 records and set a global to the IDs isn't a problem
but do that for 20,000 records and your going to be waiting a long
time. My issue is if I have to take a set of records and combine it
with another set of records but the size of either record set could be
large. The only way I know to do this with acceptable speed is to use
copy all records (IDs only) and paste them into a global, then get the
second set of IDs into another global, then combine the 2 globals and
go to related records.
In doing this I have to use the clipboard, how do you suggest avoiding
the clipboard in this process?



Reply With Quote
  #16  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-18-2005 , 02:53 AM



Quote:
Assume you have tables A, B, and C, I find I often have to go to
related records from A to B, omit a set of records and possibly add
others, then go to related records in C.
I am not sure it is relevant here, but I often use what I call the
'token' technique.
Say I have a file for Invoices, another for Payments, and a 3rd for a
general Menu of actions. In Menu I have a button to create a new
payment. From it I go to new layout 'Prepare a new Payment' of Payments,
in which I have a global 'gClientID', and 2 portals with Invoices. The
first portal is based on a token1 :
- token1 in Invoices is 'ClientID & " / " & UnPaid' where 'UnPaid' is
"X" if there is no 'PaymtID' in the record and nothing is there is one.
- token1 in Payments is 'ClientID & " / " & "X"'
On that first portal I have a field I named 'Test' which is filled by
hand with an "X" to choose the unpaid invoices that that new payment
covers.
The 2nd portal is based on a token2 :
- token2 in Invoices is 'ClientID & " / " & UnPaid & " / " & Test'
- token2 in Payments is 'ClientID & " / " & "X" & " / " & "X"'
With appropriate summaries I can then check the total amount 'due' with
test = "X" and see if the new payment of the client is equal to it.
If yes, I validate (button) and I then create a new record in the
Payments file and put its PaymentID into the appropriate Invoices.

I don't know if this could apply to your question.
Remi-Noel




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

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-18-2005 , 12:25 PM



In article <1132297022.341151.188130 (AT) z14g2000cwz (DOT) googlegroups.com>,
ab (AT) pottnerconsulting (DOT) ca says...
Quote:
42 wrote:
Your 'technique' of using the global to store temporary data is fine,
its just that you don't need to use the clipboard to move data to and
from the global.

To loop through 100 records and set a global to the IDs isn't a problem
but do that for 20,000 records and your going to be waiting a long
time. My issue is if I have to take a set of records and combine it
with another set of records but the size of either record set could be
large. The only way I know to do this with acceptable speed is to use
copy all records (IDs only) and paste them into a global, then get the
second set of IDs into another global, then combine the 2 globals and
go to related records.
In doing this I have to use the clipboard, how do you suggest avoiding
the clipboard in this process?


Your doing 20,000 records like this? Wow.

I don't like using filemakers 'multi-line' key support for more than a
couple dozen rows or a very well constrained limit. The reason for the
aversion is just a gut fear that sooner or later the user will scale it
up high enough that it will fail horribly.

That said, where are the found sets coming from?

Normally I'd try and build the found set all at once. Using 'extend
found set' for example.

Another way if the sets are truly arbitrary is to create a field
specifically for building the sets. Then you perform a 'replace' on that
field in each of the found sets (a simple replace is usually very fast)
(much faster than a looping script), and then perform a find on that
replacement, which merges the two found sets.

There's a little more to it than that, and taking it multi-user to let
different users do it simultaneously adds another wrinkle... but you get
the drift.







Reply With Quote
  #18  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: FM8 odd behavior in scripted copy/paste into pop-up menu fields - 11-19-2005 , 12:56 AM



I made 2 mistakes in my post.
You should replace the 2 lines with :
- token1 in Payments is 'gClientID & " / " & "X"'
- token2 in Payments is 'gClientID & " / " & "X" & " / " & "X"'
because one needs to look for 'gClientID' and not 'ClientID' in the new
layout 'Prepare a new Payment' of the Payments file.
Remi-Noel

"Remi-Noel Menegaux" <rnmenegaux (AT) free (DOT) fr> a écrit :
I am not sure it is relevant here, but I often use what I call the
'token' technique.
Say I have a file for Invoices, another for Payments, and a 3rd for a
general Menu of actions. In Menu I have a button to create a new
payment. From it I go to new layout 'Prepare a new Payment' of Payments,
in which I have a global 'gClientID', and 2 portals with Invoices. The
first portal is based on a token1 :
- token1 in Invoices is 'ClientID & " / " & UnPaid' where 'UnPaid' is
"X" if there is no 'PaymtID' in the record and nothing is there is one.
- token1 in Payments is 'ClientID & " / " & "X"'
On that first portal I have a field I named 'Test' which is filled by
hand with an "X" to choose the unpaid invoices that that new payment
covers.
The 2nd portal is based on a token2 :
- token2 in Invoices is 'ClientID & " / " & UnPaid & " / " & Test'
- token2 in Payments is 'ClientID & " / " & "X" & " / " & "X"'
With appropriate summaries I can then check the total amount 'due' with
test = "X" and see if the new payment of the client is equal to it.
If yes, I validate (button) and I then create a new record in the
Payments file and put its PaymentID into the appropriate Invoices.

I don't know if this could apply to your question.
Remi-Noel




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.