Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

dynamic portal sort with text & number fields

Featured Replies

To have a portal sorted in diferent ways I have the sort order of the relationship based on a calc field, which takes its value from a global field. By changing the value in the global field I change the sort order of the portal.

The problem is that I have a mix of text and number fields on which I need to sort. If the calc field is formatted to be a text result, the number fields are sorted as if they are text - for example in ascending order I get 1, 105, 2, etc.

If the calc field is formatted to be a number result, the number fields sort correctly but the text fields don't. Is there a way round this?

Try to use GetField() function, may be this function will help you.

Try to use GetField() function, may be this function will help you. And i want to know how you sort portal using global field. I will be thankful to you.

You might want to try something like:

Right ( "000" & numberField ) ; 3 )

You'll have the adjust the number of the paddings zeros and the length of the returned string to the max. possible value in your case. That makes it kind of clunky, but it can work.

  • Author

Comment - thanks for the idea, it seems qutie crafty. I'll give it a try.

aaa - In the file that contains the portal data, create a global field (gSort), and a calc field (cSortField). The calculation result should be the field you want to sort on, depending on the value of gSort ie:

case(gSort = "aaa", Field a, gsort = "bbb", Field b etc)

Where you have defined the relationship between the files, select 'sort related records' and make sure cSortfield is selected as the sort field.

Place gSort on the related file display that has the portal, display it as a pop-up menu field,define a value list for this field, using all the possible values that you want for gSort ("aaa", "bbb" etc)

Now by simply selecting the value of gSort from the menu, the portal will automatically sort according to that field.

PS This is for FM6 - you'll need to accomodate differences for FM7, if any.

Thank you very mach. It is good idea. I rember ar last time i did it with Getfield() function. One question yet: tell me this work quickly?

Thanks advance.

  • Author

As fast as you can click!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.