As far as I can work out using the ! to perform an omit find (i.e. entering !Jones to locate all records where the name is not Jones) only works for text fields.
Is there an equivalent for integer fields - I want to find all records where an ID code is not a specific value.
IT2Be
January 14, 2004, 5:45pm
2
Don’t know but I tested it in the GUI after a find declaration but it works on numbers too…
You probably mean in scripting:
(Ctrl+F does work)
controller.find()
companiesid != 3005 (or > <)
controller.search()
Doesn’t seem to work.
I’ll pass this to dev team.
in scripting if you want > or ! you have to set them as strings!
so
companiesid = ‘!3005’
or
companiesid = ‘>3005’
A point to note here is that records with empty values will not be found when using ! to locate records not equal to a specified value.
Given 6 records:
Record 1, field 1 = 1
Record 2, field 1 = 0
Record 3, field 1 = (empty)
Record 4, field 1 = 0
Record 5, field 1 = 1
Record 6, field 1 = 1
performing a Find for records where field 1 = !1 will not include record 3 in the found set, only records 2 and 4.
This is right because null/void is not a value so can’t be selected with a = XXX where statementent.
if you also want to select null values then you have to set it als equale to ^
so
controller.find()
field = ‘!1’
controller.newRecord();
field = ‘^’
controller.search();