Changing Order in Portal Rows

  • Follow


Does anyone know if  there is an easy way to allow a user to change the
order of rows in a portal? Ideally, it would be as easy to use as using
the �double headed arrow� that�s used in the Define Fields, Script
Definition or Sort Windows. Any ideas? I've constructed clunky scripts
using buttons for doing this, but drag 'n drop would be nicer.

Thank you.



0
Reply Robbie 9/24/2003 9:50:08 PM

in article 3F721186.1FDD009C@NeverSpam.FordPinto.com, Robbie at
Robbie@NeverSpam.FordPinto.com wrote on 25/9/03 7:50 AM:

> Does anyone know if  there is an easy way to allow a user to change the
> order of rows in a portal? Ideally, it would be as easy to use as using
> the �double headed arrow� that�s used in the Define Fields, Script
> Definition or Sort Windows. Any ideas? I've constructed clunky scripts
> using buttons for doing this, but drag 'n drop would be nicer.

FileMaker doesn't offer that feature natively.  It is possible to simulate
it but it is hard to set up and less efficient in the sense that if you want
to move a record up 18 rows, you have to click 18 times.

The method below is much easier to set up and works quite efficiently:

Create a number field in child file that autoenters a calc =
Status(CurrentPortalRow)

Place this field in the portal.

Sort the relationship by this field.

The above steps will autoenter the portal row number whenever a new related
record is made via the portal.

When you want to reorder a related record, you change the number to a number
smaller than record you want it to appear above and/or larger than the
number you want it to appear below, using decimals.

For example, to move the record on the fifth row to the second row, change 5
to 1.1.

To reset the numbers to whole number create a script:

Set Field [ gNumber, 1 ]
Loop
Go to Portal Row [ gNumber ] [ By Field Value�, Select entire contents ]
Set Field [ Relationship::NumberField, gNumber ]
Set Field [ gNumber, gNumber + 1 ]
Exit Loop If [ gNumber > Count(Relationship::NumberField) ]
End Loop

(where gNumber = global number field in parent file)


-- 

Bridget Eley

(to email direct, replace "DOT" with "." and remove ".invalid")

0
Reply Bridget 9/24/2003 10:10:37 PM


1 Replies
225 Views

(page loaded in 0.051 seconds)

Similiar Articles:













7/25/2012 10:54:24 PM


Reply: