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.
Juggernaut

Quick question on finds in a portal

Featured Replies

In my main database I have a portal. If I go to a particular record there are 30 line items in the portal. If I do a find, for example, to only show the ones where a field = yes, I still get all 30 items (there are only 5 the field = yes).

I could do a layout where the portal is based off a relationship where I have a global field in the main file and the =yes field in the related file. Then when I choose yes in the global field only the records where field = yes are displayed.

Could this somehow work in some way like above, but maybe I would have 4 global fields. Depending what the user selects in the 4 fields, would then create the relationship thus showing only the appropriate portal records.

LR

In a sense a portal is already displaying the results of a 'find' - it is 'finding' all the related records. You cannot do a further find in a portal in the way you were originally hoping, as that would cut across the integrity of the portal as a relationship 'window'.

Instead, the technique you are thinking of, where the portal relationship is based on a calculated key - which includes one or more global fields, is a viable alternative. In fact this is the basis of what is often referred to as 'portal filtering'.

  • Author

That is what I thought the answer would be. I understand how I can have one global field that, once set, fills in the first part of the relationship.

Is there a way to have 2 global fields. Choose one criteria in one field, choose another criteria in the second field, and then have the portal records that match both criteria be displayed.

I know how to do it with one global field, but not two or more.

LR

Hi LR,

In a sense it's really just an extension of the same general principle, but when there are two or more criterion in the mix, you have to decide whether you want an 'OR' logic for the filtering, or an 'AND' logic.

The AND method:

If you have two different criteria fields, they will be referring to two different values in order to have an 'AND' logic applied. In that case, you need a calculating key field in the related file which concatenates the two fields that the criteria will match to, and a calc key in your main file that concatenates the two global criteria fields.

Thus when a pair of values is selected in the global criteria fields, a 'pair match' key is created (behind the scenes) in the calc key in the main file, and any records which have corresponding contents in field 1 AND field 2 will be matched and displayed in the portal.

The key field formula in this case is: gCriteria1 & gCriteria2

The OR method

In it's most common implementation, filtering which is to have an 'OR logic' applied is targetting a single field in the related file, but it can target more than one field if desired. For more than one field to be targetted using an OR paradigm, you need a calculating key field in the related file which appends the two fields, separated by a carriage return, and a corresponding calc key in your main file, that brings together both fields, separated by a carriage return.

In this case, the cacl result type of both key fields must be text, regardless of the data type of the original fields.

The main field calc key formula in this case is: gCriteria1 & "

Create an account or sign in to comment

Important Information

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

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.