dbTalk Databases Forums  

selection boxes

comp.databases.filemaker comp.databases.filemaker


Discuss selection boxes in the comp.databases.filemaker forum.



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

Default selection boxes - 03-01-2007 , 08:15 PM






Do any of you know how to do the selection setup where there are two
boxes side by side....the one on the left has every available choice
(from a list) and the one on the right has only the choices
selected....in between the two are two arrows: one pointing left and
one pointing right...you know to move highlighted choices between the
two boxes? I'm sure you're all familiar with it.


I thought this would be perfect for me, but am clueless even where to
begin designing it.


Thanks in advance,

Eric


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

Default Re: selection boxes - 03-01-2007 , 09:15 PM






In article <1172801741.599724.92180 (AT) h3g2000cwc (DOT) googlegroups.com>, "EP"
<ericp023 (AT) gmail (DOT) com> wrote:

Quote:
Do any of you know how to do the selection setup where there are two
boxes side by side....the one on the left has every available choice
(from a list) and the one on the right has only the choices
selected....in between the two are two arrows: one pointing left and
one pointing right...you know to move highlighted choices between the
two boxes? I'm sure you're all familiar with it.

I thought this would be perfect for me, but am clueless even where to
begin designing it.

Thanks in advance,
Basically you need to set-up two Relationships:

NotChosen (or perhaps ALLRecords)
and
Chosen

Put two Portals on the layout, one using each of the Relationships. You
then need a script to either:

- change the Link / Key field's data for the chosen related
record so that it swaps from one Relationship to the other,
or
- copy the record from one Table / file to the other

depending on what you're wanting to do with the records.


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


Reply With Quote
  #3  
Old   
Warren Peace
 
Posts: n/a

Default Re: selection boxes - 03-02-2007 , 07:03 AM



Let's say for this example that you're on a school layout / table
and you've got a list of students that you want to be able to select
from

I would define an extra field in the student table that will act as a
flag (chosen_flag)

I'd also set up a global field in the school table that is equal to 1.
This field (chosen_const) will never change, and is there solely for
the purpose of having something to relate to

If a student was highlighted when you clicked the move -> button...
I would set that chosen_flag field = 1 (true) for that particular
record
the opposite rings true as well...
if you hit the clear(remove) button
set that chosen_flag = 0

Then in your relationship graph...
You would have 2 occurrences of the Student table

1) student is related to school... where student's schoolID = school's
schoolID (of the currently selected record)
This one will select all students from this school

2) student is related to school... where student'schosen_flag =
school's chosen_const
This one will show only selected students

Have a portal for both of these tables,
and the button functionality should be pretty straightforward


This is of course the same idea that Helpful Harry was describing...
just figured I'd go into a bit more detail

Best of Luck
Matt


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.