|
|
Check Box in a Portal
I have a number of records displayed in a portal. I would like the user to
indicate which record is currently being worked on. It would be nice to have a
check box approach where checking the box in one record deletes the check in
another record.
Is it possible to do this??
Thanks,
Rich Kayton
|
|
0
|
|
|
|
Reply
|
rkayton
|
10/1/2003 2:30:01 PM |
|
If this is a one-to-many relationship (i.e. each portal record appears in
the portal for only one main record), this is what I usually do.
(I'll call the files "Parent" and "Child". Parent has a key field (probably
a serial number) "ParentId". Child has a key field "ChildId" and a field
"ParentId" relating it to Parent.)
Create a field "ChildIdSelected" in Parent.
Create a calc field "IsSelected" = If(Parent::ChildIdSelected = ChildId, 1,
TextToNum("")).
Display the IsSelected field as a checkbox in the portal (with a value list
containing only "1").
Attach a script to the checkbox, Set Field(ChildIdSelected = Child::Id).
I sometimes find I need to add an "Exit Record/Request" or "Update Window"
step to the script to get the checkboxes to update.
Since I'm using a script, there's a bit of unpleasant hesitation every time
the user clicks the checkbox. So if anyone can do this without a script,
I'd sure like to hear about it. And I'd be very impressed too.
Thomas Berg
"Rich Kayton" <rkayton@buffalo.edu> wrote in message
news:bleod8$bh1$1@prometheus.acsu.buffalo.edu...
> I have a number of records displayed in a portal. I would like the user
to
> indicate which record is currently being worked on. It would be nice to
have a
> check box approach where checking the box in one record deletes the check
in
> another record.
> Is it possible to do this??
>
> Thanks,
>
> Rich Kayton
>
|
|
0
|
|
|
|
Reply
|
Thomas
|
10/2/2003 6:13:03 AM
|
|
This technique also involves taking the check box out of the tab order and
formatting it as a button. It is more complex, but more responsive (no
update issues) and has the advantage of landing in the record that is
selected.
Script Parent
Set Field [ gNum1, Status(CurrentPortalRow) ]
Set Field [ child::gNum2, child::child id ]
Go to Related Record [ child ] [ Show only related records ]
Perform Script [ Filename: �child.fp5�, �external script in child� ] [
Sub-scripts ]
Go to Portal Row [ gNum1 ] [ By Field Value�, Select entire contents ]
External Script in Child
Go to Layout [ (layout containing check box field) ]
Replace Contents [ check box, Replace data: Calculation: , "" ] [ No dialog
]
Go to Related Record [ self join relationship between gNum2 and child id ]
Set Field [ check, 1 ]
Bridget Eley
in article bleod8$bh1$1@prometheus.acsu.buffalo.edu, Rich Kayton at
rkayton@buffalo.edu wrote on 2/10/03 12:30 AM:
> I have a number of records displayed in a portal. I would like the user to
> indicate which record is currently being worked on. It would be nice to have
> a
> check box approach where checking the box in one record deletes the check in
> another record.
> Is it possible to do this??
>
> Thanks,
>
> Rich Kayton
>
--
(to email direct, replace "DOT" with "." and remove ".invalid")
|
|
0
|
|
|
|
Reply
|
Bridget
|
10/2/2003 9:30:30 AM
|
|
|
2 Replies
386 Views
(page loaded in 0.061 seconds)
|
|
|
|
|
|
|
|
|