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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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