AvrioTech Posted February 25, 2004 Posted February 25, 2004 Hello everyone! Its nice to find a good Filemaker pro forum! (my first post) Ive created a simple script to basically add up the isEmpty of 3 fields are filled out. The reason I created this is to make sure that all 3 fields are filled or nothing. Else it will give a generic message. ---------------------------------- [color:"green"]Problem: Is there a way to add "and >0" after the >3? I get a error when I try (this is in a if) If( ((If( IsEmpty(LBS1A) , 0 , 1 )+ If( IsEmpty(LBS1B) , 0 , 1 )+ If( IsEmpty(Price1) , 0 , 1 )) < 3) , 1 , 0 )
AvrioTech Posted February 25, 2004 Author Posted February 25, 2004 Ahh I figured it out hehe heres what I did incase someone cares hehe If( ( ((If( IsEmpty(LBS1A) , 0 , 1 )+ If( IsEmpty(LBS1B) , 0 , 1 )+ If( IsEmpty(Price1) , 0 , 1 )) <3) >0) , 1 , 0 )
AvrioTech Posted February 25, 2004 Author Posted February 25, 2004 err lol I thought I fixed it but its not working correctly... it seems to ignore the >0 because if I fill in nothing it gives me my generic message.. anyone have any ideas?
-Queue- Posted February 25, 2004 Posted February 25, 2004 ( not IsEmpty(LBS1A) + not IsEmpty(LBS1B) + not IsEmpty(Price1) ) < 3 and ( not IsEmpty(LBS1A) + not IsEmpty(LBS1B) + not IsEmpty(Price1) ) I haven't tested it, but it should be close to what you're doing.
AvrioTech Posted February 25, 2004 Author Posted February 25, 2004 Thanks for the reply. I tried that it didnt work. but I modified to this for it to work.. ( IsEmpty(LBS1A) + IsEmpty(LBS1B) + IsEmpty(Price1) ) < 3 and ( IsEmpty(LBS1A) + IsEmpty(LBS1B) + IsEmpty(Price1) >0) I sorta knew this would work but I was hoping to do it without repeating the the IsEmpty commands again so It would maybe be faster and less code space I have to really do this for about 20 lines of code really hehe so I have a need for speed
CobaltSky Posted February 25, 2004 Posted February 25, 2004 Hi AviroTech, I believe you'll find that: Abs(IsEmpty(LBS1A) + IsEmpty(LBS1B) + IsEmpty(Price1) - 1.5) = 1.5 will produce the zero or one result you are looking for without the necessity to repeat the IsEmpty( ) functions.
AvrioTech Posted February 25, 2004 Author Posted February 25, 2004 Abs(IsEmpty(LBS1A) + IsEmpty(LBS1B) + IsEmpty(Price1) - 1.5) = 1.5 This worked but I added a not (Abs(IsEmpty(LBS1A) + IsEmpty(LBS1B) + IsEmpty(Price1) - 1.5) = 1.5) and works perfect... I never thought of that very smart
Recommended Posts
This topic is 7647 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 accountSign in
Already have an account? Sign in here.
Sign In Now