dbTalk Databases Forums  

Re: Finding Checkboxes

comp.databases.filemaker comp.databases.filemaker


Discuss Re: Finding Checkboxes in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Grip
 
Posts: n/a

Default Re: Finding Checkboxes - 11-16-2006 , 02:32 PM






FYI '?' is what Filemaker returns a value it doesn't know how to
handle, either it doesn't fit in the display box, or isn't the value
doesn't match the field type, etc. It shouldn't be a value.

So, first, check your field definition for delme. Make sure it's
Number and not Date or something like that. Text would work, but
Number is better.

Now, it sounds like your second problem is the value list itself. If
checked boxes are coming up 0, then you had the value list reversed
(the first value of the 01 list is the leftmost checkbox).

I not clear what the status of an e-mail can be. Just Keep/Delete?
Maybe? Undecided? If just Keep/Delete (and it sounds that's where
you're going, I'm just not sure why you're searching for values of '?,
etc') then values of 1 & "" are fine. Some like the 1,0 Boolean thing,
but I think it's a personal preference.

Check your value list. It is just 1? No empty carriage return? And
the user field checkbox is defined to use that value list? I ask
because checked boxes are returning 0.

Now it's time to clean up your data. Checkboxes have the ability to be
more than one value, so maybe a field has a both a 1 and a 0. Figure
out if the 0s are really supposed to be 1s and the 1s blank. Find and
replace as necessary to straighten that out.

G


Jim Dornbos wrote:
Quote:
.... 2) just show records that they
haven't already marked for deletion... but that "delete me" checkbox isn't
cooperating.

I can find the checked boxes fine (great for the upcoming "show me my
deleted records" feature), but I'm not having any luck finding delme!=0,
delme<0, delme=1, delme=? etc. I put another "edit box" version of the
delme field on my layout and the value seems to be 0 for checked and ? for
unchecked.

Originally, I figured I wanted a 0 or a 1 in there, so I made value list
consisting of 0 and 1. After doing some reading here in c.d.fm I changed
my value list to just 1... but I'm obviously not getting the hang of this
checkbox.

I'd appreciate any pointers on what I should be doing to come up with a
list of addresses belonging to a single owner that haven't been flagged
for deletion.



Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Finding Checkboxes - 11-16-2006 , 05:45 PM






In article <op.ti4h9ojiz6evoe@jdornbos>, "Jim Dornbos"
<usenet (AT) work (DOT) com> wrote:

Quote:
I'm using FM7 to assemble a database for managing a company-wide email
list.

After processing our mail server's log, I end up with a list of addresses
we've sent mail to, along with the "owner's" email address - which I'm
then bringing into FileMaker.

I want owners to be able to review their list of email recipients, and
mark addresses for deletion - the perfect place for a "delete me"
checkbox... or so I thought. From my "owner profile" layout I send users
off to a "View My List" layout - which I'd like to 1) limit to just their
addresses (working fine - setting a global to the owner's email address on
the way out of the owner profile layout, then finding matching records for
display on the "View My List" layout) and 2) just show records that they
haven't already marked for deletion... but that "delete me" checkbox isn't
cooperating.

I can find the checked boxes fine (great for the upcoming "show me my
deleted records" feature), but I'm not having any luck finding delme!=0,
delme<0, delme=1, delme=? etc. I put another "edit box" version of the
delme field on my layout and the value seems to be 0 for checked and ? for
unchecked.

Originally, I figured I wanted a 0 or a 1 in there, so I made value list
consisting of 0 and 1. After doing some reading here in c.d.fm I changed
my value list to just 1... but I'm obviously not getting the hang of this
checkbox.

I'd appreciate any pointers on what I should be doing to come up with a
list of addresses belonging to a single owner that haven't been flagged
for deletion.

Eventually the database will be shared on FMSA 7.03 to both mac and PC
clients.
In your database you just want to mark values to be deleted, so you
will only ever need it to be on or off. This means that you only need a
value list with one value - the "on" value. The actual value you use
can be whatever you want: 1, Yes, Delete, Harry Potter, etc. although
it's often easiest to use the same as the text label you want to appear
next to the checkbox (if there is one).

When the checkbox is "off" the field is empty, and when the checkbox is
"on" the field contains the data value (eg. "1"). In the case of a
multi-value checkbox the different "on" values are separated by return
characters.

As you've already discovered, to find the records with the checkbox
"on", you just need to search for the records that have the field set
to "1". (Obviously this is via a script since manually you can just
turn the checkbox on.)
eg.
Enter Find Mode []
Set Field [CheckboxField, "1"]
Perform Find []

To find the records with the checkbox "off", you can perform a "Not"
find using the Omit function to leave out those that are checked "on"
(there's no such thing in FileMaker as Find "!=").
eg.
Enter Find Mode []
Set Field [CheckboxField, "1"]
Omit Record
Perform Find []

This is the same as using the small Omit checkbox in FileMaker's
side-toolbar when performing Finds manually.

Another way is to search for records that have the field empty using
the "=" symbol in the field by itself.
eg.
Enter Find Mode []
Insert Calculated Result [CheckboxField, "="]
Perform Find []

You can't use Set Field here due to a peculiarity in the way FileMaker
wants that command to function. Using the Insert Calculated Result
command works, but you do HAVE to be on a layout that has the field on
it ... unlike Set Field which works whether or not the field is on the
current layout.


Because you've been playing with various checkbox values, you may need
to put the normal "edit box" version of the field on a layout and make
sure all the records do have an empty field to begin with. When you
change the value list, the existing values don't get removed and you
can easily end up with "garbage" data left in the field causing "weird"
problems.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Finding Checkboxes - 11-17-2006 , 10:39 PM



In article <op.ti6dtcexz6evoe@jdornbos>, "Jim Dornbos"
<usenet (AT) work (DOT) com> wrote:

Quote:
On Thu, 16 Nov 2006 18:45:12 -0500, Helpful Harry
helpful_harry (AT) nom (DOT) de.plume.com> wrote:

As you've already discovered, to find the records with the checkbox
"on", you just need to search for the records that have the field set
to "1". (Obviously this is via a script since manually you can just
turn the checkbox on.)
eg.
Enter Find Mode []
Set Field [CheckboxField, "1"]
Perform Find []

To find the records with the checkbox "off", you can perform a "Not"
find using the Omit function to leave out those that are checked "on"
(there's no such thing in FileMaker as Find "!=").
eg.
Enter Find Mode []
Set Field [CheckboxField, "1"]
Omit Record
Perform Find []

This is the same as using the small Omit checkbox in FileMaker's
side-toolbar when performing Finds manually.

Another way is to search for records that have the field empty using
the "=" symbol in the field by itself.
eg.
Enter Find Mode []
Insert Calculated Result [CheckboxField, "="]
Perform Find []

You can't use Set Field here due to a peculiarity in the way FileMaker
wants that command to function. Using the Insert Calculated Result
command works, but you do HAVE to be on a layout that has the field on
it ... unlike Set Field which works whether or not the field is on the
current layout.

Thanks for your help. Somewhere along the way I did find the FieldName=
instructions, but was unable to get it to work ... now I see why. I'm
certain I was just trying to Set Field with it.

As I worked my way through the options on this, another one that looked
like it might work, but didn't - is specifying the find details in the
Perform Find step. If memory serves me right, I had success specifying a
field to be this value or that value, but I wasn't having any luck getting
it to process the value for globals:wner. FM kept wanting to stick the
literal string "globals:wner" in there for the search. It's an unrelated
record - I suppose that's the problem - but is there a way around that?
I don't quite know why you'd be getting "globals:wner" put into a
field, unless you've actually typed that (WITH the quote marks) into
the second parameter of the Set Field command.
ie.
Set Field [MyField, ""globals:wner""]

(FileMaker has an annying "feature" of putting extra quote marks in
it's functions that many people, including me, simply leave out when
typing scripts into messages.)

When performing Finds manually (or setting them up for storing with a
script), then you can't type another field name into an existing field.
You can only type in actual data.


As for the second bit, if I understand correctly, you can't access
related fields in Find mode because there is no valid relationship
links when in Find mode. What you would need to do is first transfer
the wanted value to a local Gloabl field and then enter Find mode.
ie.
Set Field [g_TempGlobal, globals:wner]
Enter Find Mode []
Set Field [FindField, g_TempGlobal]
Perform Find []



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.