Solved

Filemaker record reorder popup

Posted on 2014-11-06
2
399 Views
Last Modified: 2014-11-07
Hi,

I have a list of projects in a single table each of which has a UID serial number field and separate numerical sort order field.

Wondering if there is a way to display the list in a layout or portal and allow user to select any item in the list,  and move it up or down the list order,  updating the 'sort order'  field with its new position.  

The purpose is to be able to create custom sort order for report layout.

Any pointers much appreciated..
0
Comment
Question by:Ringah
2 Comments
 
LVL 24

Accepted Solution

by:
Will Loving earned 500 total points
ID: 40427845
I'm sure there are a number of ways this could be done so I'll just suggest one that I used here recently. In the portal row, I have two arrow buttons, one pointing up and one pointing down. Each button is attached to the same script called simply "Move Row Up/Down". The "Up" arrow button has "Up" as a script parameter, the "Down" arrow button has "Down" as the parameter.

The script looks like this:

If [ Get(ScriptParameter) = "Up" ]
#
#Already First Row
   If [ Get ( ActivePortalRowNumber ) = 1 ]
      Beep
      Exit Script [ ]
   End If
   #
   #Move Up One
   Set Field[ SetItem::Order ; SetItem::Order - 1 ]
   Go to Portal Row [ Previous ]
   Set Field[ SetItem::Order ; SetItem::Order + 1 ]
   #
Else
   #
   #Already Last Row
   If [ Get ( ActivePortalRowNumber ) = Count( SetItem::zk_SetItem_ID )
      Beep
      Exit Script [ ]
   End If
   #
   #Move Down One
   Set Field[ SetItem::Order ; SetItem::Order + 1 ]
  Go to Portal Row [ Next ]
  Set Field[ SetItem::Order ; SetItem::Order - 1 ]
   #
End If

My actual script includes an additional option if the ALT/Option key is held down that moves the row to the top or bottom of the list. The one for moving to the top is:

If [ Get ( ActiveModifierKeys ) = 8 ]
   Set Field [ SetItem::Order ; 0 ]
   Commit Records/Requests [ Skip data entry validation ; No dialog]
   Refresh Window [ ]
   Perform Script [ "Renumber Set" ]
End If

The sub-script at the end resets the Order field back to the actual number of the Portal row.
0
 

Author Comment

by:Ringah
ID: 40427956
Hi Will, this works perfectly particularly so as method compatible with the legacy data imported, very much appreciated...
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Data center mess 4 72
powershell and sql server - alerting 7 77
use lov values 2 38
Need a SQL Server 2014 plug-in to scan the DB schema 4 21
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now