Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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

}

Posted

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 ) 

This topic is 5122 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.