Jump to content
Sign in to follow this  
dschaal

Simply If Statement Not Working

Recommended Posts

For some reason this very simple If statement isn't working the way I thought it would in a calculation field.

If(Day(EntryDate::Date)>15;0;Rates::V_HrsPerMonth)

The field EntryDate is a standard date field MM/DD/YY

So, I enter a date like 08/25/2012 .

The calculated field then should equate to: If 25>15 enter 0.

Instead I get the Rate from the second portion of the formula in the field. Any suggestions...it is probably something really simple but I just can't see it today.

Thanks in advance for your help! Donna

Share this post


Link to post
Share on other sites

Is this calculation field in the EntryDate table?

Share this post


Link to post
Share on other sites

I am guessing there is more than one related record - and the first related record contains a date in the first half of the month.

Share this post


Link to post
Share on other sites

That isn't the case. The Table of EntryDate only has one record in it. It has a date field which I change to whatever MM/DD/YY that the timesheets are entered on. This is the field that I am trying to use in the formula.

Share this post


Link to post
Share on other sites

Why don't you post a file showing the problem - hopefully, a simplified one.

Share this post


Link to post
Share on other sites

Perhaps you could use a global field in the same table to enter the data (EntryDate), to then use that in the calculation.

I don't know what the relation between the tables are like to know what exactly is going on.

Share this post


Link to post
Share on other sites

Is this a field of type Calculation or of type Number with an auto-enter calculation?

Are you sure the relationship is valid? If you change the calculation to just EntryDate::Date, what happens?

Share this post


Link to post
Share on other sites

Sorry, I have been offline for awhile, the relationship wasn't valid. I needed to add another instance and now it appears to be working fine.

Thank you! Thank you! For all the suggestions. Donna :laugh2:

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  

  • Who Viewed the Topic

    1 member has viewed this topic:
    fileman922 
×

Important Information

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