![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I have come to believe that the role of global fields should and will become very limited. The only reasons I can think of to use global fields are for display purposes: 1) You need to display some temporary value on a layout. 2) You have a portal based on a special relationship where you want to allow users to change how or what is displayed in the portal. Anything I'm missing or any downsides to this way of thinking? |
#2
| |||
| |||
|
|
Howard Schlossberg wrote: I have come to believe that the role of global fields should and will become very limited. The only reasons I can think of to use global fields are for display purposes: 1) You need to display some temporary value on a layout. 2) You have a portal based on a special relationship where you want to allow users to change how or what is displayed in the portal. Anything I'm missing or any downsides to this way of thinking? I try to pass a $$variable from one file to another: I set a $$variable and call a script in the second file. The $$variable is dead on arrival in the second file. It seems that unless I stay in the same file, I still need a global field in order to pass on a value :-( |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Why can't you use a copy and paste from a text field? |
#5
| |||
| |||
|
|
Why not just pass a parameter? |
#6
| |||
| |||
|
|
Why can't you use a copy and paste from a text field? Generally speaking, one should avoid as much as possible the copy-paste technique because, in a network, one may at the same moment use the 'interim buffer' with another copy-paste, and then you may get in 'pasting' his 'copy' and not yours. Thus when designing a solution, one should use globals that are 'local' ie specific to the user at least in FMP6 and maybe - I don't know - 'parameters' in FM7-8. Remi-Noel |

#7
| |||
| |||
|
|
42 <nospam (AT) nospam (DOT) com> hat geschrieben: [$$variables dies when leaving the file] Why not just pass a parameter? What's a parameter in FMP? |
#8
| |||
| |||
|
|
Its a feature of FM7 and 8. (So if you have access to "variables" you have access to script parameters.) |
#9
| |||
| |||
|
|
If so, are you sure? No, I am not sure. I just think to recall that reasonning in the US |
|
In article <43784624$0$31903$626a54ce (AT) news (DOT) free.fr>, rnmenegaux (AT) free (DOT) fr says... Why can't you use a copy and paste from a text field? Generally speaking, one should avoid as much as possible the copy-paste technique because, in a network, one may at the same moment use the 'interim buffer' with another copy-paste, and then you may get in 'pasting' his 'copy' and not yours. Thus when designing a solution, one should use globals that are 'local' ie specific to the user at least in FMP6 and maybe - I don't know - 'parameters' in FM7-8. Remi-Noel Remi-Noel, I agree with your sentiment, but I'd like clarification on your reasoning.. Are you saying that copy/paste runs on the *servers* clipboard? If so, are you sure? I admit I don't use copy/paste script steps much, but I beleive that the copy/paste functions in filemaker operate on the local systems operating systems clipboard, not the servers. I honestly can't imagine what *use* they would have if they ran on the server... I thought the whole purpose of copy was to put data in the users clipboard so they could paste it elsewhere - or equivalently retrieve data the user had copied to the clipboard from elsewhere. --- Regardless, I agree with your sentiment...but for a different reason. Just as general programming practice, the guidelines as set out by the os publishers regarding the clipboard are simple: don't touch it. Put data into it when the user requests it, and retrieve data from it when the user requests it. Do not use it for interal inter-process or inter-thread communication (and it goes without saying that this "prohibition" covers using it to store parameters in function calls within a single application. ![]() Using/copy paste for parameter passing blows out the contents of the clipboard replacing it with data that the computer user had no intention of putting there and which is not useful to him/her, and possibly destroying valuable data he *did* put there. When I copy, say an URL off a web page, then push a few buttons in filemaker to create a new record etc... when I press ctrl-v to paste the URL i copied earlier I expect it to still be there... and would be most unimpressed if instead it pasted 1422552R-87B. Generally globals in Pre7, and Parameters in 7+ is the best way to handle script parameter handling. (Although there are some cases where globals make more sense than parameters in 7+ as well) |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |