AnsweredAssumed Answered

Click based portal sorting

Question asked by Stu412 on Jan 23, 2017
Latest reply on Jan 23, 2017 by Johan Hedman

Hi there

 

I'm trying to use a portal based on a child table to create a contents page against the parent record.  The idea I want to follow is that the user can click either an up or down arrow to move an individual portal row up or down on the contents list.  I have the buttons set up for this and a field to hold a number which I want to sort on - the lower the number, the higher in the contents the portal row will appear.

 

I am having an issue refreshing the portal once a script to change the sort number has run.  The sort number between the row above and the row below are exchanged fine, but on finishing the script my portal does not resort, despite my trying refresh portal, refresh window, goto the child table layout, sort that, come back to the parent layout.....etc etc

 

Script is here and this should be working ok, I think FM is having a laugh at my expense!

 

  • Set Variable $Original:PortalRow::SortField <<<Original Row sort number
  • Go to Portal Row [Select; Previous] <<<Go to the row above
  • Set variable $New:PortalRow::SortField <<<Grab it's sort number
  • Set Field PortalRow::SortField; $Original <<<Set it as the original number
  • Go to Portal Row [Select; Next]<<<Go back to the original row
  • Set Field PortalRow::SortField;$Next<<<Set the sort as the second sort number
  • Sort Records [SortField]<<<Sort portal (Epic fail)
  • Refresh Portal[ PortalName] <<<Brute Force (Epic fail)

 

The last two rows simply are not working as I would expect, so any help is appreciated here - chances are I missed something glaringly obvious.

 

Thanks

Outcomes