Jump to content
Server Maintenance This Week. ×

simple fm script errors


This topic is 2926 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 by Joost Miltenburg
clarification
Link to comment
Share on other sites

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 by Joost Miltenburg
Link to comment
Share on other sites

This topic is 2926 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.