Submitted by jan_rifkinson on 2010/10/04 13:03
The following equation does not seem to be working here
 
A:Today=|
A:Tomorrow=|
A:ThisWeek=|
A:DateDue=Int(Now)+7
 
 
I guess I could remove the last line & the last "|" and rename the 'next week' field to 'future'
 
Doesn't the above mean:
The value is not today
The value is not tomorrow
The value i's not this week
The value is whatever the datedue is +7
 
2010/10/06 bumped
2010/10/14 bumped
2010/11/09 bumped
 
 
 

Comments

Try A:DateDue=Int(Now())+7
 
The (now) returns the system date (today's date) and time. The Int gives returns the integer part of this, effectively removing the time.

jan_rifkinson

2010/10/05 10:33

In reply to by KeithB

Thanks, KeithB.
I tried it re-opened IQ but there were no items assigned to next week off their datedue dates.
I added a new item w a datedue for next week, refreshed, jumped to a different grid & back w/o the desired result.
As an aside, I have a question though. In field options I had <format>shortdate</format>
Does that duplicate the job of the "Int" command?

Jan I cant really help you much with this stuff, in fact I only have more questions
 
Can you clarify, you say
  1. The value is not today
  2. The value is not tomorrow
  3. The value i's not this week
  4. The value is whatever the datedue is +7
but # 4 there should surely be:
 
        4.  DateDue field should show today + 7 days
 
Is that what you want to do?

 

jan_rifkinson

2010/10/14 14:14

In reply to by Tom

[quote=Tom]
  1. The value is whatever the datedue is +7
but # 4 there should surely be:
 
        4.  DateDue field should show today + 7 days
 
Is that what you want to do?
 
 
[/quote]
 
yes, exactly
 
 

[quote=jan_rifkinson]
The following equation does not seem to be working here
 
A:Today=|
A:Tomorrow=|
A:ThisWeek=|
A:DateDue=Int(Now)+7
[/quote]
 
These are auto-assign rules which should be put in some field auto-assign rule section.
 
Let's say those are in the NextWeek field as you seem to suggest from your title.
 
When you check the "NextWeek" check box in a form or in your grid :
 
Today gets unchecked
Tomorrow gets unchecked
ThisWeek gets unchecked
DateDue will be set to todays date + 7 days.
 
That's what it'll do.
 
The above should work if it's exactly what you have in your "NextWeek" auto-assign rule.
But I don't  know what other rules you have in all the other fields, so... it's a big hypothesis.
 

jan_rifkinson

2010/11/10 17:28

In reply to by Armando

Armando,
By other fields do you mean
Today, Tomorrow, ThisWeek ??

Armando

2010/11/10 18:01

In reply to by jan_rifkinson

[quote=jan_rifkinson]
Armando,
By other fields do you mean
Today, Tomorrow, ThisWeek ??
[/quote]
 
Yes, principally, but their could be others.
What I mostly mean is that you need to check that no other fields manipulate these field's (Today, Tomorrow, ThisWeek...) data. It shouldn't, but who knows.
 
Questions :
1- What results are you expecting from you different auto-assign rules ?
2- What's not working in your current implementation ?
 
I can't help further if I don't know for sure what the problem is.

jan_rifkinson

2010/11/11 08:54

In reply to by Armando

The result I'm expecting is that
If I assign a DateDue for next week that the boolean (NextWeek) field is checked
This is so I can filter for non-blanks in a futures grid, giving me a view of what is due next week

Armando

2010/11/11 09:16

In reply to by jan_rifkinson

[quote=jan_rifkinson]
The result I'm expecting is that
If I assign a DateDue for next week that the boolean (NextWeek) field is checked
This is so I can filter for non-blanks in a futures grid, giving me a view of what is due next week
[/quote]
 
I see. Well this isn't going to work!
 
For that you need an equation to analyse the date in datedue and check the NextWeek field if it's next week. If you want this equation to update the NextWeek field then you need to automate it so that it runs everyday.
 
Something like this, put in the NextWeek field's row equation s :
 
= IIF ( DueDate > (int(now) + 7) , -1,  0 )
 
 
But I saw that Pierre added equations in the new sample DB. What don't you use that model ???
 
 
Today field :
 
Auto-assign :
 
A:Tomorrow=|A:ThisWeek=-1|A:NextWeek=
 
Row equation :
 
=isToday(DueDate)
 
 
tomorrow field :
 
Auto-assign :
 
A:Today=|A:ThisWeek=-1|A:NextWeek=
 
Row equation :
 
=isTomorrow(DueDate)
 
 
NextWeek
 
A:Today=|A:Tomorrow=|A:ThisWeek=

 
ThisWeek
 
A:NextWeek=

jan_rifkinson

2010/11/11 10:43

In reply to by Armando

because I don't think it's working right here, i.e. doesn't seem to assign to next week

Armando

2010/11/11 11:18

In reply to by jan_rifkinson

[quote=jan_rifkinson]
because I don't think it's working right here, i.e. doesn't seem to assign to next week
[/quote]
 
It works in the sample DB...

jan_rifkinson

2010/11/11 15:02

In reply to by Armando

Unfortunately that doesn't help me at the moment

Armando

2010/11/11 15:11

In reply to by jan_rifkinson

Neither does it help me...
 
You need to at least try one or the other solution, completely, with all row equations + auto assign rules as I've took the time explain to you this morning. If you don't because you presume it doesn't seem to work (and it does in the sample DB), then I cannot do anything for you.
 
[Edit : In your code you don't seem to use any row equation, + you seem to use a field called DateDue instead of the normal DueDate. These are all little detail that make the difference. But I don't have your own modified DB in front of me, so you'll have to figure it out. ]
 
Thanks.

jan_rifkinson

2010/11/12 09:44

In reply to by Armando

Armando, you make a number of assumptions in your post. Putting the personal digs aside, the most important assumption is that I haven't tried either solution completely & that I am presuming something; a mistake you make & not the first time you have made it w me. 
 
Over time I have found a number of instances where my posts are assumed problematic because of an insistence that I am not doing something right & I have had to jump through a lot of hoops with screen dumps & videos & other things (which is ok because they can be helpful) & still things are not resolved. But then, some time later, the same problem -- or similar enough to be connected -- pops up from someone else & it finally gets resolved. Having said that, there is no denying that I make plenty of mistakes, am no technocrat, am certainly not as conversant as you are with IQ but the fact also remains that I use IQ every day to sort thru my very fractured & busy life.
 
Anyway & again most important, I take it from your post that you can no longer be of any help in this particular instance so I hope Pierre or someone else will arrive on the scene & help solve the problem I still have. And, yes, I am aware of the difference between DueDate & DateDue.
 
 

Armando

2010/11/12 10:10

In reply to by jan_rifkinson

Let me quote you from your one of your previous posts :
 
[quote=jan_rifkinson]
because I don't think it's working right here, i.e. doesn't seem to assign to next week
[/quote]
 
I went from there. You seemed to make assumptions, so I hypothesised that you might haven't tried fully. Sorry about that.
 
So :
you have  tried opening a sample DB and just use it a bit to see how well it works ? (thisweek, nextweek, etc.)
 
The idea here is that if there's a problem with your own DB setting, it'd hard for anyone to find out what's going out without having all the details.