April 21, 20169 yr LS, I am running FM script below as a schedule. The script runs fine in this form. On FMserver it gives me an error. I am probably overlooking something to easy... Regards, Joost --- Set Error Capture [ On ] Allow User Abort [ Off ] Go to Layout [ “Entry” (CONTACT) ] Enter Find Mode [] Set Field [ CONTACT::contactnr ; "<100" ] Perform Find [] If [ Get (FoundCount) > 0] Send Mail [ Send via SMTP Server ; No dialog ; " ] Else Exit Script [ Result: 0 ] End If Edited April 21, 20169 yr by Joost Miltenburg clarification
April 21, 20169 yr 1=1 always evalutes to true so whats the point? Please explain what fails if you leave out the or 1=1 part. Edited April 21, 20169 yr by Kris M
April 21, 20169 yr Author I know... the point is... when I remove it, the script apparently fails ( or so says FMserver ). I am looking for the answer to the question why it fails on FMserver when the 1=1 is gone. I edited the question
April 21, 20169 yr what error does it give you? The fms log should tell you what it is on what script step.
April 21, 20169 yr Author error 401... Figures as I don't want to find records with these values. Don't ask... So I changed the script to : Set Error Capture [ On ] Allow User Abort [ Off ] Go to Layout [ “Entry” (CONTACT) ] Enter Find Mode [] Set Field [ CONTACT::contactnr ; "<100" ] Perform Find [] Set Variable [ $lastError ; Value: Get (LastError) ] If [ Get (LastError) = 0 ] Send Mail [ Send via SMTP Server ; No dialog ; " ] Else If [ Get (LastError) = 401 ] Exit Script [ Result: $lastError ] End If Runs fine.... Question : Set Error Capture [ On ] should have taken care of this in my previous version. Shouldn't it ? Edited April 21, 20169 yr by Joost Miltenburg
Create an account or sign in to comment