
1. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
wimdecorte Aug 28, 2016 3:59 AM (in response to JamesBind)You will be fine.
Why do you think using script params use 'large amount of memory'?
I have never known any FM solution that crashes because it runs out of memory for using script params. Hard to imagine any FM solution these days that does not use script params.

2. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
JamesBind Aug 28, 2016 4:07 AM (in response to wimdecorte)Thanks Wimdecorte for the prompt answer,
I think I was reading in an FM book (old could be ver 11) that using lots of variables at the same time and in loops, etc. can use up memory and cause FM to crash
So that is my concern, happy to know you had no probs using Script Parameters  do you have large complex calculations in your db? : )

3. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
wimdecorte Aug 28, 2016 4:12 AM (in response to JamesBind)JamesBind wrote:
do you have large complex calculations in your db? : )
In some solutions that had to do with life sciences: absolutely.

4. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
JamesBind Aug 28, 2016 4:16 AM (in response to wimdecorte)I am not 100% sure but I think that a while back I was reading in one of the FM books (could be ver 11) that script parameters may use up large memory and cause a crash.
I use FM to calculate the Purchase of land and mortgage repayments, so I click run and it takes 5 minutes
The main concern is that once one field is populated, the second required to be populated and then the third, etc. and I may crash : )

5. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
beverly Aug 28, 2016 4:43 AM (in response to JamesBind)do you have calculations that depend on other calculations? Have you considered using script Set Field instead of calculation(s) in part of your routine(s)?
beverly

6. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
JamesBind Aug 28, 2016 5:17 AM (in response to beverly)Hi Beverly
Yes, that is what I have, breaking down a very large calculation to smaller calculations and this is why I think, it is slow. So I am wondering if I will script this long process replacing calculation fields, then shall I use global fields or alternatively shall I use Script Parameters?

7. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
beverly Aug 28, 2016 5:52 AM (in response to JamesBind)If some of those smaller calculations can be "calculated once and stored" (by scripted Set Field), then the calculation(s) that need to call the smaller stored values will be faster. Only you can determine what can be set and stored. But I have found this to be significantly better in the long run over complex calculations.
beverly

8. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
wimdecorte Aug 28, 2016 6:06 AM (in response to JamesBind)Can you post an example of one of those complex calcs and describe what it does? Perhaps we can lend a hand in simplifying and make it faster.
You can use global fields instead of script params but script params are cleaner and easier to manage the lifetime and 'garbage collection'

9. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
David Moyer Aug 28, 2016 6:42 AM (in response to JamesBind)1 of 1 people found this helpfulHi,
aside from the current track of tuning up your calculations, I just wanted to point out a way that I use them to pass multiple parameters. Send your script a ¶separated list. Then use:
$list = Get(ScriptParameter)
$var1 = GetValue($list; 1)
$var2 = GetValue($list; 2)
etc.

10. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
JamesBind Aug 29, 2016 4:46 AM (in response to beverly)Hi Beverly, Thanks for your help, Yes I am using some Set Fields too. What I was looking for is some kind of refference to point out issues with using Script Variables and found it. This issue of the potential impact of overuse of variables on available application memory is addressed on page 339 of the FileMaker 10 Bible. So I will never use Script Variables (as at the moment my way of thinking is). Well unless there is something / anything that cannot be done with Global fields and can only be done with Script Parameters. Re the Speed issue, I created a Testing file to compare the use of Variables VS Global fields found them to take the same amount of time. The script was less then half a second and the variables also less then half a second. Thanks again for your help!

11. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
JamesBind Aug 29, 2016 4:49 AM (in response to David Moyer)Hi David, Thanks for the help, very clever idea but I won't be using Script Variables as 1. They not much if at all faster (I was told they can't be indexed) and 2. They may cause memory issues and crashing is last thing I want to happen to my client. Thanks for the help!

12. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
wimdecorte Aug 29, 2016 4:49 AM (in response to JamesBind)2 of 2 people found this helpfulJamesBind wrote:
What I was looking for is some kind of refference to point out issues with using Script Variables and found it. This issue of the potential impact of overuse of variables on available application memory is addressed on page 339 of the FileMaker 10 Bible. So I will never use Script Variables (as at the moment my way of thinking is).
I think that is entirely the wrong conclusion. There are no issues with script variables.

13. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
beverly Aug 29, 2016 4:54 AM (in response to JamesBind)"overuse" being the key factor?
I use the $vars sparingly and $$vars even less. But I never say never.
beverly

14. Re: I am planing to start using Script Parameters but concerned from running out of memory and crashing or any other issue. Can somebody advise me pls if any such issue?
JamesBind Aug 29, 2016 4:55 AM (in response to wimdecorte)Hi Wimdecorte
Thanks for your help, can't post here the formulas as there are several calculations (5) and they all linked to each other. So the result of the first calculation is part of the second calculation and the result of the second is part of the third calculation and so on. So it is a bit complex but I found what I was looking for that there are some issues with Script Variables. As I am not overly familiar with SV I just avoid them and will have to do the old (and 'dirty') way using fields. Thanks again for the help!
Max(A;B;C;D;E) & "¶" &
If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) & "¶" &
If( GetAsNumber(A) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(B) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(A) and not IsEmpty(B) and Max(C;D;E) <= Min(A;B) ; Max(C;D;E);
If( GetAsNumber(A) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(C) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(A) and not IsEmpty(C) and Max(B;D;E) <= Min(A;C); Max(B;D;E);
If( GetAsNumber(A) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(D) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(A) and not IsEmpty(D) and Max(B;C;E) <= Min(A;D); Max(B;C;E);
If( GetAsNumber(A) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(E) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(A) and not IsEmpty(E) and Max(B;C;D) <= Min(A;E); Max(B;C;D);
If( GetAsNumber(B) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(C) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(B) and not IsEmpty(C) and Max(A;D;E) <= Min(B;C); Max(A;D;E);
If( GetAsNumber(B) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(D) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(B) and not IsEmpty(D) and Max(A;C;E) <= Min(B;D); Max(A;C;E);
If( GetAsNumber(B) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(E) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(B) and not IsEmpty(E) and Max(A;C;D) <= Min(B;E); Max(A;C;D);
If( GetAsNumber(C) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(D) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(C) and not IsEmpty(D) and Max(A;B;E) <= Min(C;D); Max(A;B;E);
If( GetAsNumber(C) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(E) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(C) and not IsEmpty(E) and Max(A;B;D) <= Min(C;E); Max(A;B;D);
If( GetAsNumber(D) >= If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and GetAsNumber(E) >=If( GetAsNumber(A) = Max(A;B;C;D;E) and not IsEmpty(A); Max(B;C;D;E); If( GetAsNumber(B) = Max(A;B;C;D;E) and not IsEmpty(B); Max(A;C;D;E); If( GetAsNumber(C) = Max(A;B;C;D;E) and not IsEmpty(C); Max(A;B;D;E); If( GetAsNumber(D) = Max(A;B;C;D;E) and not IsEmpty(D); Max(A;B;C;E); If( GetAsNumber(E) = Max(A;B;C;D;E) and not IsEmpty(E); Max(A;B;C;D);""))))) and not IsEmpty(D) and not IsEmpty(E) and Max(A;B;C) <= Min(D;E); Max(A;B;C); "")))))))))) & "¶" &
If(Length(Right( GetAsNumber(A); 1)) + Length(Right( GetAsNumber(B); 1)) + Length(Right( GetAsNumber(C); 1)) + Length(Right( GetAsNumber(D); 1)) + Length(Right( GetAsNumber(E); 1)) = 5 ;(If( GetAsNumber(A) = Min(A;B;C;D;E) and not IsEmpty(A); Min(B;C;D;E); If( GetAsNumber(B) = Min(A;B;C;D;E) and not IsEmpty(B); Min(A;C;D;E); If( GetAsNumber(C) = Min(A;B;C;D;E) and not IsEmpty(C); Min(A;B;D;E); If( GetAsNumber(D) = Min(A;B;C;D;E) and not IsEmpty(D); Min(A;B;C;E); If( GetAsNumber(E) = Min(A;B;C;D;E) and not IsEmpty(E); Min(A;B;C;D);""))))));If(Length(Right( GetAsNumber(A); 1)) + Length(Right( GetAsNumber(B); 1)) + Length(Right( GetAsNumber(C); 1)) + Length(Right( GetAsNumber(D); 1)) + Length(Right( GetAsNumber(E); 1)) = 4; Min(A;B;C;D;E); "")) & "¶" &
If( not IsEmpty(A) and not IsEmpty(B) and not IsEmpty(C) and not IsEmpty(D) and not IsEmpty(E) ; Min(A;B;C;D;E); "")