Jump to content
Server Maintenance This Week. ×

If If Else statements


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

Recommended Posts

Hello,

I'm an artist, and would ask your patience with me in regard to programming....I am attempting to use what I thought would be a simple If, IfElse statement, but I keep getting an error message "The specified field can not be found'. The fields do indeed exist, and I have tried every permutation of quotation marks and brackets, as well as in text and calculation formats for the field in question...I want the field I'm programming to look at another field, "Calculation Field 1", and if it is filled with the word 'Five" to input text from another field, "Printer 1". If "Printer 1" is empty, then I want it to fill in anything in the field "empty". I think this is simple enough...here is the latest unsuccessful attempt:

If [(Calculation Field 1 = "Five", "Printer 1")]

Else If [Get (Empty)]

End If

I am using FMP 10 on a Mac.

Many thanks,

Edited by Guest
Link to comment
Share on other sites

I don't think that this should be done in a script, if I understand your intention. Do your logic in a calculation field.

Let's say your field is "PrinterChosen" and is a calc field:

If (Calculation Field 1 = "Five" , Printer 1, Empty)

Your field names leave a lot to be desired, btw, lol.

Link to comment
Share on other sites

In

'If (Calculation Field 1 = "Five" , Printer 1, Empty)'

If the field 'Calculation Field 1 has The word 'Five' in it, then the field which has this code should have the term 'Printer 1' input? If

'Calculation Field 1' has anything else, the field with this code should have nothing input into it? Am I reading this code correctly?

If so, It isn't reporting a true event. Any thoughts?

Edited by Guest
Link to comment
Share on other sites

Actually, the calculation reads,

If the field named Calculation Field 1 has the value "Five" in it, then show the value in field Printer 1, otherwise show the value in field Empty.

If you only want the value in field Printer 1, otherwise do not put anything in Calculation Field 1, then the calc would be:

If (Calculation Field 1 = "Five" ; Printer 1 ; "")

Link to comment
Share on other sites

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