jonep Posted January 27, 2011 Posted January 27, 2011 We are sending data from filemaker to sage using some scripts. We have found that the process breaks if there is no company name defined when posting. I would therefore like to alter the script so that on posting it checks to make sure there is a company name and if not instead sends the Firstname and Surname as the company name. Our current script: SET FIELD [sage::accountname; MD::CompanyName] What I would like: SET FIELD [sage::accountname; Then the second part defined by an if test(which I am not sure if it is right - hence the question): If ( MD::CompanyName; MD::CompanyName; MD::FirstName MD::Surname ) So I am trying to say if companyname is defined (or true) then show companyname as accountname else use firstname and surname. Have I got it right though?
comment Posted January 27, 2011 Posted January 27, 2011 (edited) You need to use the IsEmpty() function as well as the & operator: If ( IsEmpty ( MD::CompanyName ) ; MD::FirstName & " " & MD::Surname ; MD::CompanyName ) Edited January 27, 2011 by comment
jonep Posted January 27, 2011 Author Posted January 27, 2011 Thank you, that seems to have done the job perfectly!
Recommended Posts
This topic is 5049 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 accountSign in
Already have an account? Sign in here.
Sign In Now