Jump to content
Server Maintenance This Week. ×

I am having a problem with the "IF" Function


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

Recommended Posts

Hello, I am new to the forum so im not sure if this is posted in the correct section so i apoligize if i have.

I am having a problem with the if function,

Script is as follows:

If [$$Weekend="Yes"]

Perform Find [Restore]

Else If [$$Weekend="No"]

Perform Find [Restore]

End If

The Perform Finds are two different finds, one serches for a number in week field and the other in a weekend field,

but when $$Weekend is "No" it shows results that contain the number is either field,

The code for the Finds are:

Weekend = yes Find:

Table::weekends =$$Number

Weekend = no Find:

Table::weeks =$$number

Any help woud be appreciated,

Many thanks,

Jafacakes2011

Link to comment
Share on other sites

I have fixxed it but have no idea what i did wron, i think it was beacause i have scripts starting more scripts which started more scripts so i just pu it all ino one script and it worked.

Now you got me confused. Anyway, try this for a more comfortable script experience …

btw, don't use $$vars if you don't need them; makes housekeeping easier.

Bank only2.fmp12.zip

Link to comment
Share on other sites

it was because i had two perform finds in the find and i thought that you had to select one of the finds i didnt read the bit at the top which says that the finds will be done in the order from top to bottom, thanks for all your help, i really appreciated it and i am sorry for waisting your time.

Link to comment
Share on other sites

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