AnsweredAssumed Answered

prioritization lists

Question asked by trialuser1111 on Sep 10, 2009
Latest reply on Sep 10, 2009 by comment_1

Title

prioritization lists

Post

I would like to be able to add the functionality of prioritization to a layout of mine, and I've got an idea of how to do it, but I can't seem to get it right.  This one may be a little too complicated to answer via the forum, but here it goes...

 

After users construct a find in the Find Firm layout, they click the Go button which performs the find and takes them to the Prioritization Layout and then assigns a number in the field Firm Data:: Prioritization Ranking.  The script looks like this:

 

Perform Find []

Go to Layout [Priority List]

Go to Record [First]

Set Field [Firm Data:: Priority Ranking ; 1 ]

Loop

   Go to Record [Next ; Exit after last]

   Set Field [Firm Data:: Priority Ranking ; 1 + ( GetNthRecord (Firm Data:: Priority Ranking ; Get (RecordNumber) - 1 ) ) 

End Loop

Exit Script []

 

That works pretty well, and the Prioritization layout is designed to auto-sort by Priority Ranking on every Record Commit.  However, what I'd like to do now is add buttons to bump a firm up or down on the priority list.  It would be easy to have the "bump up" button subtract 1 from the Prioritization Ranking, but then I'd have two firms with the same priority.  How can I add this functionality while maintaining a unique value for each Prioritization Ranking?  e.g. if I want to bump the firm ranked 5th (Prioritization Ranking = 5) up to 4, or push it all the way to the top (which I'd like to be able to do), how do I then reassign the other priorities to correspond?

Outcomes