schmegol Posted May 18, 2018 Posted May 18, 2018 (edited) 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, 2018 by schmegol
Lee Smith Posted May 18, 2018 Posted May 18, 2018 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
Fitch Posted May 18, 2018 Posted May 18, 2018 Still the best method to sort a portal: http://www.fitchandfitch.com/2011/05/filemaker-portal-sorting/ 1
Recommended Posts
This topic is 2436 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now