![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Gulp! At last - script variables!! But am I right to be astonished that the calculation result fort script variablkes can only be text, so that for example if using a script variable as a loop counter the simple Set Variable ($LoopCount=$LoopCount+1) doesn't increment the value of LoopCount! I am not sure about this, but, am I correct in thinking that the way to deal with this is: Set Variable ($LoopCount=Evaluate($LoopCount+1)) ? Mike |
#3
| |||
| |||
|
|
$LoopCount=$LoopCount+1 works fine for me blag wrote: Gulp! At last - script variables!! But am I right to be astonished that the calculation result fort script variablkes can only be text, so that for example if using a script variable as a loop counter the simple Set Variable ($LoopCount=$LoopCount+1) doesn't increment the value of LoopCount! I am not sure about this, but, am I correct in thinking that the way to deal with this is: Set Variable ($LoopCount=Evaluate($LoopCount+1)) ? Mike |
#4
| |||
| |||
|
|
I have double-checked and it doesn't work for me!! I wonder what is going on? (I am running FMPro 8 on Windows XP.) Mike On Sun, 04 Sep 2005 09:04:17 -0700, Howard Schlossberg howard (AT) antispahm (DOT) fmprosolutions.com> wrote: $LoopCount=$LoopCount+1 works fine for me |
#5
| |||
| |||
|
|
blag wrote: I have double-checked and it doesn't work for me!! I wonder what is going on? (I am running FMPro 8 on Windows XP.) Mike On Sun, 04 Sep 2005 09:04:17 -0700, Howard Schlossberg howard (AT) antispahm (DOT) fmprosolutions.com> wrote: $LoopCount=$LoopCount+1 works fine for me |
#6
| |||
| |||
|
|
I just ran the following script and it ended with the 'Text' field being '11' (which is correct). Can you post a sample of your script? You understand that a variable starting with $ is local to the script in which it runs, and $$ is global across multiple scripts and files, and once the script is over $LoopCount will be '0'...right? Loop Set Variable [ $LoopCount; Value:$LoopCount + 1 ] Exit Loop If [ $LoopCount > 10 ] End Loop Set Field [ Table::text; $LoopCount ] blag wrote: I have double-checked and it doesn't work for me!! I wonder what is going on? (I am running FMPro 8 on Windows XP.) Mike On Sun, 04 Sep 2005 09:04:17 -0700, Howard Schlossberg howard (AT) antispahm (DOT) fmprosolutions.com> wrote: $LoopCount=$LoopCount+1 works fine for me |
#7
| |||
| |||
|
|
Interestingly I also discovered that the another script, which works fine in 7 doesn't work in 8! (Other users beware!) A scipt step Set Field(sel::Num sel;Count (Sel job no Dwgs::UserID) gives a ? result for sel::Num sel in the data viewer, which of course causes the script to fail |
|
Is your Table::text field a text field? (Not that it should make any difference, because you are finding that the increment works, whereas I have found it doesn't) |
|
Am I right in thinking that 8 remmbers printers? 7 seemed to always revert to the default printer, whereas I am now findng that my databases now seem to know what printer is to be used, even though they (so far as I can tell) don't remember the page size. |
![]() |
| Thread Tools | |
| Display Modes | |
| |