Jump to content
Sign in to follow this  
Jafacakes2011

I am having a problem with the "IF" Function

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

Share this post


Link to post
Share on other sites

I suggest you post the file.

Share this post


Link to post
Share on other sites

I am getting an eror when i try to upload it?

Error You aren't permitted to upload this kind of file

Zip the file and upload the zip.

Share this post


Link to post
Share on other sites

Not to put too fine a point at it, but there *is* one record where both weekend and week have the value 10. What are you actually trying to achieve?

Share this post


Link to post
Share on other sites

Sorry, it seems that that file works, i think there must be a bit of confusion in my other file, i will have a look and if i fix it i will tell you what my error was

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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