AnsweredAssumed Answered

Sorting portals in IWP for list

Question asked by paolobkk on Feb 23, 2013
Latest reply on Mar 5, 2013 by paolobkk


Sorting portals in IWP for list


     Hi Everyone!


     I'm developing a database for IWP for the first time and I'm using portals to avoid the limits of  the list and table view.

     (FMSA12 on Macmini Server)

     A simple example is the ITEMS table.

     I've created another occurrence of the ITEMS table (ITEMS2) and related to each other with a X operator (using item_id)

     The portal display all the items in list as I want, and this is ok.

     Now I would like the user to be able to sort the portal but I didn't find a solution yet. frown

     Is there any way to script a sorting relationship or portal? (eg. 1 button for category, 1 button for code, 1 button for description, an so on)


     Thanks for your comments!


     I've found a temporary solution:

     I've defined a global field (gfield_for_sort_IWP) and a calculation field (field_for_sort_IWP - unstored) as follow:

Case ( 
gfield_for_sort_iwp = "code" ; code;
gfield_for_sort_iwp = "description" ; description;
gfield_for_sort_iwp = "category" ; category
     Then I set in the relationship to sort records by field_for_sort_IWP.
     The scripted buttons in the layout set the gfield_for_sort_IWP with "code" (or other x value), and the calculated field updates with the values I want to use for sorting.
     This works also if the sorting is done directly form the portal.
     In FMA12 client the sorting is pretty fast (990 records over fix IP), but in IWP from the browser it takes sometime to relist the items.
     I'm wondering if there is another solution or some fine tuning to do to speed up.... any suggestion?