dbTalk Databases Forums  

Script Issue

comp.databases.filemaker comp.databases.filemaker


Discuss Script Issue in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Michael Myett
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 11:33 AM






On Thu, 06 Jan 2011 11:13:17 -0600, dweidman <user (AT) compgroups (DOT) net/>
wrote:

Quote:
I will say that his records in the db are being displayed but it is returning both the checked records and unchecked records. Other manager's return their own records but with only their unchecked items.

Also, what kind of data lives behind the checkbox? 1's or 0's? Yes or
No?

Reply With Quote
  #12  
Old   
Michael Myett
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 12:14 PM






On Thu, 06 Jan 2011 11:48:18 -0600, dweidman <user (AT) compgroups (DOT) net/>
wrote:

Quote:
the data is a yes.

Go to the layout with the checkbox and temporarily change it to a text
box so you can actually view all the data in it. Check the bad manager
records to see if maybe there is a yes and a no in the field. This
would cause them all to show up in a search.

Reply With Quote
  #13  
Old   
dweidman
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 01:00 PM



That was it Your A Genius.

There was a 0 or O in the box of two of the records like this.

0
yes



Thank You,
Doug

Reply With Quote
  #14  
Old   
Michael Myett
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 01:20 PM



On Thu, 06 Jan 2011 13:00:51 -0600, dweidman <user (AT) compgroups (DOT) net/>
wrote:

Quote:
That was it Your A Genius.

There was a 0 or O in the box of two of the records like this.

0
yes



Thank You,
Doug

Your welcome.

Reply With Quote
  #15  
Old   
Your Name
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 06:12 PM



In article <ia6dnXcVt7z-jLvQnZ2dnUVZ_tSdnZ2d (AT) giganews (DOT) com>, dweidman
<user (AT) compgroups (DOT) net/> wrote:

Quote:
That was it Your A Genius.

There was a 0 or O in the box of two of the records like this.
0
yes

Thank You, Doug
Good to see the solution has been found.

I did have another thought which might help anyone else with similar
problems. The "Restore" option can often be the cause of problems with
scripted Finds:

- If you do not want stored Find requests, then you have to make
sure you've turned it off (often easily overlooked and left on),

or - if you do want to used stored Find request, that the stored
request is actually what you think it is. In newer versions of
FileMaker you can check the stored Find requests within the
Script editor, but in older versions you need to either print
the Script or insert a temporary Pause command directly after
the command with the Restore option so that you can manually
check what is being inserted.


Helpful Harry )

Reply With Quote
  #16  
Old   
Michael Myett
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 07:05 PM



On Fri, 07 Jan 2011 13:12:24 +1300, your.name (AT) isp (DOT) com (Your Name)
wrote:

Quote:
In article <ia6dnXcVt7z-jLvQnZ2dnUVZ_tSdnZ2d (AT) giganews (DOT) com>, dweidman
user (AT) compgroups (DOT) net/> wrote:

That was it Your A Genius.

There was a 0 or O in the box of two of the records like this.
0
yes

Thank You, Doug

Good to see the solution has been found.

I did have another thought which might help anyone else with similar
problems. The "Restore" option can often be the cause of problems with
scripted Finds:

- If you do not want stored Find requests, then you have to make
sure you've turned it off (often easily overlooked and left on),

or - if you do want to used stored Find request, that the stored
request is actually what you think it is. In newer versions of
FileMaker you can check the stored Find requests within the
Script editor, but in older versions you need to either print
the Script or insert a temporary Pause command directly after
the command with the Restore option so that you can manually
check what is being inserted.


Helpful Harry )
That's a good point Harry.

Hopefully you know the answer to this. After having found out that
was the problem my next question was how did the extra data get in
those fields?

I normally use a data field, a graphics field, a global graphic
container field and a script to simulate checkboxes and radio buttons,
never the actual elements from FileMaker. So I am not familair w/ how
these 2 layout elements behave.

Does one allow multiple selections without using any special
keystrokes?

Just as an aside, I gotta say I really miss the days when this was a
lively group. There were many talented, generous Filemaker developers
who participated on a regular basis. I can't help coming back here
periodiclly just to see what is going on. It's good to see at least
they is some activity.

Reply With Quote
  #17  
Old   
Michael Myett
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 08:45 PM



On Thu, 06 Jan 2011 20:05:51 -0500, Michael Myett
<michael.myettatadelphia.net@> wrote:

Quote:
On Fri, 07 Jan 2011 13:12:24 +1300, your.name (AT) isp (DOT) com (Your Name)
wrote:

In article <ia6dnXcVt7z-jLvQnZ2dnUVZ_tSdnZ2d (AT) giganews (DOT) com>, dweidman
user (AT) compgroups (DOT) net/> wrote:

That was it Your A Genius.

There was a 0 or O in the box of two of the records like this.
0
yes

Thank You, Doug
Never mind Harry. I did a little experiment and checkboxes can be
dangerous. As an example, if you create a field called "Complete" as a
checkbox using a value list of "Yes" and than make the default value
of the field No, which seems to make perfect sense. Since the is
unlikely complete when you create the new record then click the
checkbox when complete you will wind up w/ both a yes and no value in
the field. This will not happen w/ a radio button, which will replace
the no w/ a yes when clicked.

So if you really need to use a checkbox don't set a default value, but
the use of a radio button seems to make the most sense.

Reply With Quote
  #18  
Old   
Your Name
 
Posts: n/a

Default Re: Script Issue - 01-06-2011 , 09:13 PM



In article <ruuci6dr639qca8sn9hpboktdrovbmf655 (AT) 4ax (DOT) com>, Michael Myett
<michael.myettatadelphia.net@> wrote:
Quote:
Never mind Harry. I did a little experiment and checkboxes can be
dangerous. As an example, if you create a field called "Complete" as a
checkbox using a value list of "Yes" and than make the default value
of the field No, which seems to make perfect sense. Since the is
unlikely complete when you create the new record then click the
checkbox when complete you will wind up w/ both a yes and no value in
the field. This will not happen w/ a radio button, which will replace
the no w/ a yes when clicked.

So if you really need to use a checkbox don't set a default value, but
the use of a radio button seems to make the most sense.
If you're using extra Fields and a Script (as you said in the previous
message) to simulate checkboxes / radio buttons, then the Script can of
course set any values you need ... your Script can remove the deafult
value by simply setting the Field to the new value.
i.e. To turn on the checkbox
Set Field [CustomCheckbox; "Yes"]

To turn off the Checkbox
Set Field [CustomCheckbox; "No"]

A Field formatted as normal FileMaker Checkboxes will add checked values
and remove unchecked values without affecting other values that may
already be in the Field. If a deault value is not actually clickable in
the Field on a Layout, then it can't be removed by the user (a Script or
Calculation can of course alter the values in any way you want). These are
for when you want users to be able to choose multiple options from the
choices.

A Field formatted as normal FileMaker Radio Buttons will only store one
value. The exception is if you hold down a modifer key, which then lets
you turn on multiple Radio Buttons ... but that's really something
FileMaker Inc should "fix" since it goes against all normal user interface
guidelines. These are for when you want users to chose only ONE option
from the choices.

Helpful Harry )

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.