Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

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?

Posted

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
Posted

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

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 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.