Newbies nickhoffman Posted October 5, 2007 Newbies Posted October 5, 2007 Hi, I am working on an inventory management system and am having a problem. I have made a mock calculation field that looks like this: IF(IsEmpty(fieldx)=1 and IsEmpty(fieldy)=1;"yes";"no"). This calculation works; however, when I attempt to plug the logical test into a script using the IF script step, the AND operator doesn't seem to work. If I use one of the logical test instead of both, my script runs perfect. Below is the portion of the scrip that is giving me fits. >Else If [Get(FoundCount)<> 0] >>Go to Last Record >>If[isEmpty(Staging::Returned to Warehouse)=0 and IsEmpty(Packaging::Time In)=0] >>>Delete Record >>Else If[isEmpty(Staging::Returned to Warehouse)=1 and Is Empty(Packaging::Time In)=1] >>>Enter Browse Made >>>Paste.... Again the script runs fine if I only use one of the logical tests but as soon as I use the AND operator and two logical tests the thing doesn't work. Also, the fields are all in related tables. What am I missing?
comment Posted October 5, 2007 Posted October 5, 2007 I see no reason why it wouldn't work. Of course, if the tested fields are in related tables, the test considers only values from the FIRST related record in each table. BTW, your syntax is a bit too verbose. This should work equally well: Else If [ Get(FoundCount) ] Go to Last Record If [ not IsEmpty ( Staging::Returned to Warehouse ) and not IsEmpty ( Packaging::Time In ) ] Delete Record Else If [ IsEmpty ( Staging::Returned to Warehouse ) and IsEmpty ( Packaging::Time In ) ] Enter Browse Made
Newbies nickhoffman Posted October 5, 2007 Author Newbies Posted October 5, 2007 must be something to do with the table relationship and how the tests are evaluated among the records. Thanks for the tips. Guess I'll keep trying
Recommended Posts
This topic is 6260 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