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.

Relationship not filtering portal as expected

Featured Replies

Hi guys!

I'm about to embark on a project where I'm solely responsible for tracking a lot of different items distributed amongst 20 people. Barcodes were my solution and and the app I've put together works a treat. However, I'm trying to use checkboxes to filter out related records in a portal. When I try to implement this the portal goes blank, which isn't the result I expected.

The two tables I'm having an issue with are "Projects" and "Assignments". The "Assignments" portal is on the "Projects" layout. The relationship is:

Assignments::ProjectID = Projects::ProjectsID

This accurately displays all the related records in the portal. However, when I add a global field to the Projects table ("filter_assignment_status") and link the status value list to the "Status" field in the Assignments table, connect the with the added relationship the table goes blank:

Assignments::ProjectID = Projects::ProjectsID
AND Assignments::Status = Projects::filter_assignment_status

The value list matches any of the values that would appear in the Assignments::Status field. It's worth noting that the Status field is a calculation that uses the Case() function. I'm wondering if the unstored calculation field is the issue?

Case ( 

WrappedFlag = 1 ; "Wrapped" ;
IsEmpty ( ItemCount ) or ItemCount = 0 ; "No assets!" ; 
not IsEmpty ( ItemCount) ; "Active" ;

"OK"

)

 

Unstored calc can not be used on the child side of the relationship as a key field.

  • Author

@mr_vodka I figured this was it! Thank you.

Can you suggest a work around for this?

well you can keep your original relationship and then use the filter portal option.

  • Author

I've never attempted to filter a portal based on checkbox selections. Is there a particular function that would achieve this?

Never mind PatternCount() did the trick :)

Case (  IsEmpty ( Projects::filter_assignment_status ); 1 ;  IsEmpty ( FilterValues ( Projects::filter_assignment_status; Assignments::Status ) ) )

 

You will need to refresh the portal.  You can use a simple script trigger to refresh the portal when the global field is modified. 

*  This also assumes that you want to show all the records if nothing is checked in the global.  If you do not want that, then just rid of the first part of the Case statement.

  • Author

Thank you!

Why can't the calculation be stored?

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.