Submitted by jan_rifkinson on 2011/12/01 09:52
[Invoice] and [itemcolor is &H99CCFF]
 
field = invoice
field = ItemColor
 
Doesn't seem to work w or w/o brackets

Comments

[quote=jan_rifkinson]
[Invoice] and [itemcolor is &H99CCFF]
 
field = invoice
field = ItemColor
 
Doesn't seem to work w or w/o brackets
[/quote]
 
I am not good at this, but my guesses would be:
 
1. Are you paying attention to capitalization? Look at your two references to Invoice. I have found that sometimes my equations seem overly sensitive to this. Not sure if this still applies in W3 as I haven't changed my equations for a while.
 
2. Should this [itemcolor is &H99CCFF] be this [Itemcolor] is &H99CCFF? Again there is a difference with caps. The I and C in itemcolor.
 
Just guesses.
 
Jon

Hi Jan and Jon,
 
A few notes
  1. Square brackets are only required when field names contain spaces and special characters, which isn't the case here
  2. Apart from Null, (i.e. Field1 is Null), all other comparison is done through normal operators ( = , <, >, <>, >=, <=).
  3. Field names are case insensitive
  4. Double-quotes are required around strings (itemcolor is a text field)
So... the correct filter should be:
 
Invoice and itemcolor = "&H99CCFF"
 
HTH !
 
Pierre
 

Jon

2011/12/01 14:58

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Hi Jan and Jon,
 
A few notes
  1. Square brackets are only required when field names contain spaces and special characters, which isn't the case here
  2. Apart from Null, (i.e. Field1 is Null), all other comparison is done through normal operators ( = , <, >, <>, >=, <=).
  3. Field names are case insensitive
  4. Double-quotes are required around strings (itemcolor is a text field)
So... the correct filter should be:
 
Invoice and itemcolor = "&H99CCFF"
 
HTH !
 
Pierre
 
[/quote]
 
Yes it does. Thank you.
 
Wasn't there a time where brackets were required and the field names were case sensitive (I may be mixing this up with another program)?
 
I did not know about the double quote requirement for strings. I use named colors, but this is good information.
 
Jon

jan_rifkinson

2011/12/01 17:12

In reply to by Pierre_Admin

Thank you Pierre. Really appreciate it but...... so many rules that the average user will never be able to harness some of the real power of IQ. Can't this stuff be simplified?
I don't want to appear ungrateful 'cause I'm not. Just sayin'.....
 
It's like the difference between using The Bat! & Thunderbird filters. It's like day & night.

Pierre_Admin

2011/12/01 21:30

In reply to by jan_rifkinson

> It's like the difference between using The Bat! & Thunderbird filters
 
Meaning... which one do you recommend ? Do you think, this way of doing could be applied to IQ ?
 

jan_rifkinson

2011/12/02 10:22

In reply to by Pierre_Admin

Meaning Thunderbird filters, constructed in "english" rather than formulas, is infinitely more user friendly & accomplish the same thing(s).
I haven't looked @ The Bat! filtering for a few years since I moved over to Thunderbird (for this very reason) so they may have changed but early filters were constructed by equations. They may have simplified filtering to broaden their market share as The Bat! -- much like IQ -- is a very powerful program, safe & capable of almost anything.
 
So now I'm trying to do the following:
 
when I check boolean field paid
I'd like IQ to
insert current date into Date field DateDone
 
I added equation
A:paid=
in the DateDone equation field w/o results
 
What should I be doing instead?
 
Maybe I just have a block about this stuff as I continue to ask VERY basic questions even after all this time but at some level, I think I represent the wider potential audience for IQ

Armando

2011/12/02 13:57

In reply to by jan_rifkinson

I won't address the filters problems as this is for Pierre -- and it's probably related to the "named filters" project/features.
 
As to insert current date into DateDone field  when Paid is checked  : Logically, what you want is for Paid to act on DateDone, right ? so the auto-assign equation must :
 
-...be in Paid, not in DateDone.
- assign a value to DateDone, since that's what you want to do. Right now you're assigning a value to Paid
- assign at least some values. Right now it assigns nothing--> A:Paid=nothing
 
So in Paid, just add this
 
A:DateDone=now
 
Alternatively, you might want to get rid of seconds :
 
A:DateDone=int(now)
(technically, what int() does, is to return the integer portion of a number. Dates are stored as Real numbers, where the decimal part represents fractions of a day)
 
 
Alternatively, you might want to also add a line so that the DateDone field emptied when Paid is unchecked :
 
A:DateDone=int(now) |


E:DateDone=
 
 
If you check out the sample DB, you'll see that there are other equations you could use as models. It's true that more sophisticated auto assigns aren't always trivial when you don't know any VB. But... then if someone has a UI suggestions to allow all these possibilities, it would be nice to see.
 
 
--------------------------------------------------------------------------------
Windows XP Home Edition, Service pack 3
Dell Vostro 1500, Ram:3gb, CPU: Intel Core2Duo T7500 2.2ghz

jan_rifkinson

2011/12/02 14:10

In reply to by Armando

Armando, Thank you VERY MUCH for the explanation about how to accomplish what I wanted to do.
 
Both you & Pierre have offered really clear directions & explanations.
 
I must have fooled around with this thing for more than an hour before posting. I feel like a REAL DUMMY as it's so logical but I just don't grasp it so I continually return to the forum every time I have one of these issues.
Maybe ONE DAY the light will come on.  

jan_rifkinson

2011/12/02 13:59

In reply to by Pierre_Admin

Pierre, so what's wrong with this equation?
 
Invoice and itemcolor = "Moss"
It doesn't work for me.

Pierre_Admin

2011/12/02 16:34

In reply to by jan_rifkinson

Invoice and itemcolor = "Moss" should work...
 
You have items with both Invoice "checked" and ItemColor field set to "Moss" ?
 

jan_rifkinson

2011/12/05 14:12

In reply to by Pierre_Admin

Got it working, Pierre. Pilot error. Cross this one off the list