dbTalk Databases Forums  

populating multiple checkbox choices in script

comp.databases.filemaker comp.databases.filemaker


Discuss populating multiple checkbox choices in script in the comp.databases.filemaker forum.



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

Default populating multiple checkbox choices in script - 12-16-2009 , 11:55 AM






FM 10 advanced - WinXP

I have a layout showing a list of tasks each of which has a status of
"Pending", "Completed", "Resolved" or "Postponed". In the header of the
layout I have a checkbox with the status choices and a button to "refresh"
the view. This provides a way to filter the list so you can see only the
pending items, etc...

When a user arrives at this screen all tasks are shown (show all records in
the openeing script) and I want all statuses in the checkbox to be chosen.
So in the open script I added the step - set field (_ViewFilter; "Pending
Completed Resolved Postponed"). However, when the layout opens no statuses
are checked. I also tried the same command and placing a newline character
between each value. This populates the first value only.

The data viewer shows that the 'words' are assigned to the field but the
boxes are not affected the way I intended. I've looked thru several forums
trying to find how to do this but so far no luck.

Anyone have any experience here?

Reply With Quote
  #2  
Old   
Lynn Allen
 
Posts: n/a

Default Re: populating multiple checkbox choices in scriptX-TraceApproved - 12-16-2009 , 12:04 PM






On 2009-12-16 09:55:58 -0800, "GSteven" <GSP@DavClaServ> said:

Quote:
FM 10 advanced - WinXP

I have a layout showing a list of tasks each of which has a status of
"Pending", "Completed", "Resolved" or "Postponed". In the header of the
layout I have a checkbox with the status choices and a button to "refresh"
the view. This provides a way to filter the list so you can see only the
pending items, etc...

When a user arrives at this screen all tasks are shown (show all records in
the openeing script) and I want all statuses in the checkbox to be chosen.
So in the open script I added the step - set field (_ViewFilter; "Pending
Completed Resolved Postponed"). However, when the layout opens no statuses
are checked. I also tried the same command and placing a newline character
between each value. This populates the first value only.

The data viewer shows that the 'words' are assigned to the field but the
boxes are not affected the way I intended. I've looked thru several forums
trying to find how to do this but so far no luck.
A checkbox field is a regular text field with formatting applied. Put a
separate copy of the field on the layout next to the one formatted with
checkboxes, only don't format the copy. Leave it as a regular text
field. Open it up so it shows at least four lines.

Then click the checkboxes, in any order. What you'll see appear in the
copy field is the values you select, in order of selection, separated
by returns (the pilcrow character).

So if you clicked the boxes in this order, this is what you'll see:

Pending
Resolved
Completed
Postponed

If you copy & paste the above into the unformatted field, all four of
your checkboxes should trigger and be checked.

I don't know if your newline is the same as the return/pilcrow. I
suspect it isn't. Spaces clearly do not work as separators.

All value lists and functions that operate on value lists work the same
way. Values are separated by returns, and you can extract them using
GetValue(), or count them with ValueCount().
--
Lynn Allen
--
www.semiotics.com
Member FBA
FM 10 Certified Developer

Reply With Quote
  #3  
Old   
jahn
 
Posts: n/a

Default Re: populating multiple checkbox choices in script - 12-16-2009 , 12:08 PM



When I run a test script based on your setup above, it appears to work
fine. I'm setting the field using the calculation "Pending-Completed-
Resolved-Postponed" where "-" is the paragraph symbol and not simply a
return. Is that what you're using, or does your string look different?

Reply With Quote
  #4  
Old   
GSteven
 
Posts: n/a

Default Re: populating multiple checkbox choices in script - 12-16-2009 , 12:33 PM



Thanks to Lynn and jahn for your quick replies. I used the term 'newline' to
describe the pilcrow symbol that appears in the 'specify calculation' dialog
box. I should have pasted the actual text into my last post. Your replies
prompted me to do a little more experimenting. It seems that the following
is what I needed - a pilcrow BEFORE each entry instead of just separating
them.

"¶Pending¶Resolved¶Ignore¶Postpone"

Who'da guessed it? Again I appreciate your input.

"GSteven" <GSP@DavClaServ> wrote

Quote:
FM 10 advanced - WinXP

I have a layout showing a list of tasks each of which has a status of
"Pending", "Completed", "Resolved" or "Postponed". In the header of the
layout I have a checkbox with the status choices and a button to "refresh"
the view. This provides a way to filter the list so you can see only the
pending items, etc...

When a user arrives at this screen all tasks are shown (show all records
in the openeing script) and I want all statuses in the checkbox to be
chosen. So in the open script I added the step - set field (_ViewFilter;
"Pending Completed Resolved Postponed"). However, when the layout opens no
statuses are checked. I also tried the same command and placing a newline
character between each value. This populates the first value only.

The data viewer shows that the 'words' are assigned to the field but the
boxes are not affected the way I intended. I've looked thru several forums
trying to find how to do this but so far no luck.

Anyone have any experience here?

Reply With Quote
  #5  
Old   
jahn
 
Posts: n/a

Default Re: populating multiple checkbox choices in script - 12-16-2009 , 12:38 PM



That should work fine, but I don't think you need the leading pilcrow
before "Pending." In my test, it worked without one.

Best,
-J.

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

Default Re: populating multiple checkbox choices in script - 12-16-2009 , 02:22 PM



"GSteven" <GSP@DavClaServ> wrote

Quote:
Thanks to Lynn and jahn for your quick replies. I used the term 'newline'
to
describe the pilcrow symbol that appears in the 'specify calculation'
dialog
box. I should have pasted the actual text into my last post. Your replies
prompted me to do a little more experimenting. It seems that the following
is what I needed - a pilcrow BEFORE each entry instead of just separating
them.

"¶Pending¶Resolved¶Ignore¶Postpone"

Who'da guessed it? Again I appreciate your input.
As Jahn says, you don't need the first return character (pilcrow), just one
between each value.

Although it has worked (at least for me), copying and pasting the return /
pilcrow character or other non-alpha-numeric characters can be a waste of
time - it doesn't transfer through all newsservers and newsreader
applications, so some people simply see blank spaces or some other garbage
instead.

Helpfull Harry )

Reply With Quote
  #7  
Old   
Ursus
 
Posts: n/a

Default Re: populating multiple checkbox choices in script - 12-19-2009 , 09:18 AM



you need to retain the first pilcrow if the field already contains a value
which you want to keep

--
Keep well / Hou je goed

Ursus
"Your Name" <your.name (AT) isp (DOT) com> schreef in bericht
news:hgbfcu$mg4$1 (AT) lust (DOT) ihug.co.nz...
Quote:
"GSteven" <GSP@DavClaServ> wrote in message
news:9c743$4b29271c$d1a8fa82$7951 (AT) EDELTACOM (DOT) COM...
Thanks to Lynn and jahn for your quick replies. I used the term 'newline'
to
describe the pilcrow symbol that appears in the 'specify calculation'
dialog
box. I should have pasted the actual text into my last post. Your replies
prompted me to do a little more experimenting. It seems that the
following
is what I needed - a pilcrow BEFORE each entry instead of just separating
them.

"¶Pending¶Resolved¶Ignore¶Postpone"

Who'da guessed it? Again I appreciate your input.

As Jahn says, you don't need the first return character (pilcrow), just
one
between each value.

Although it has worked (at least for me), copying and pasting the return /
pilcrow character or other non-alpha-numeric characters can be a waste of
time - it doesn't transfer through all newsservers and newsreader
applications, so some people simply see blank spaces or some other garbage
instead.

Helpfull 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.