November 25, 201015 yr Hello, Suppose a scriptmaster with in entry two fields of a FileMaker database. I want to do some actions only if both of thesse fields are not empty. I'm at level 0 and don't find the correct syntax to use : if field1 and field2 are not empty my command endif Thanks for the helper ! Noêl
November 25, 201015 yr Author hello, Thanks for your proposition. I did but a first error was found and I did what I thought asked to do : place not in brackets... But a second error occurs and I don't understand I join two screen copies. Noël (hope you'll not laugh too much !) Archive.zip
November 25, 201015 yr Sorry, I didn't realize that you were asking about Scriptmaster code. I thought that you were asking how to conditionally run a command, outside of the scriptmaster code.
November 25, 201015 yr Author Hello John ! Thanks for that answer. My question is linked to another mail I posted here ( http://fmforums.com/forum/showtopic.php?tid/217817/). I saw that if I wanted to pass through a proxy I had to include these line in my script Properties props = System.getProperties() props.put("http.proxyHost", proxyname) props.put("http.proxyPort", proxyport) It seems running if proxyname (here I had in fact IP of the proxy) and proxyport of the database are not empty . After your answer I tried this : // declaration proxy If ( proxyname != null && proxyname != null ) { Properties props = System.getProperties() props.put("http.proxyHost", proxyname) props.put("http.proxyPort", proxyport) } but error, error... horror ! Can you help me more ? Thanks Noël
November 26, 201015 yr This bit works... so the error might be somewhere else. This will return the value you put into the port which demonstrates it works, or false if one of the values has nothing in it Looks like the 'error' is somewhere else.... if( proxyname != null && proxyport != null ){ props = System.getProperties() props.put("http.proxyHost", proxyname ) props.put("http.proxyPort", proxyport ) return System.getProperty("http.proxyPort") } else { return false }
November 27, 201015 yr Only just look properly... You had the same variable test twice on the first line, which mean if proxyport was empty it would throw an error If ( proxyname != null && proxyname != null )
November 27, 201015 yr Author Yes, I saw the repetition for the same condition ! Thanks one more time. Noël
Create an account or sign in to comment