May 18, 20187 yr I have a small database and in a portal I have data from a related table. I have tried many ways to dynamically sort the portal column (customer_name) by having the field name passed along to a global field (g_sort) via set field script (get Script Parameter) and then a calculation of getfield("g_sort") by to pass the field name to the Portal Sorting engine. All seems to work up to the getfield("g_sort") is not passed to the portal sorting. the portal is set up to sort via the result of the getfield("g_sort") calculation, unstored and text result, and then refreshed via the script.. No matter how I do it, it will not sort. my conclusion is the field "name" I would like to sort by is not being passed to the sorting portal although all calculations and script debug tools and data viewer show the fields are being set properly. So my script parameter is the name of the field I want to sort by, Ie "customer_name" The set field script grabs that parameter and sets it to the g_sort global field. The portal is sorted by the result of "sort_field=GetField("g_sort")" calculation, IE portal setup, Sort by field ascending "sort_field". This Should work, but does not. What the hell am I doing wrong? I got this generic method from many similar solutions on various forums. Edited May 18, 20187 yr by schmegol
May 18, 20187 yr Hi schmegol, Have you watch any of the videos on portal sorts? This search brought up several how-to videos on portal sorts. https://www.youtube.com/results?search_query=filemaker+16+portals+sort Hope this helps. Lee
May 18, 20187 yr Still the best method to sort a portal: http://www.fitchandfitch.com/2011/05/filemaker-portal-sorting/
Create an account or sign in to comment