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.

Count of Filtered Portal Values

Featured Replies

I have a new table named CourseList - a self join table using courseID. Within a layout, I have a portal which is filtered and sorted based on dropdown menus and checkboxes.

For example, I can see which courses are assigned to a particular budget for a particular quarter (e.g., in fall 2015, I have (7) courses for budget A, which are taught by (3) instructors). I have also created a duplicate single-row portal to get the record count (or # courses for that qtr). How can I get unique counts for number of teachers from the filtered portal data. For example Smith teaches (4) classes, Jones teaches (2) classes and Wilson teaches (1) class - I need to get a count of (3).

 

Have you tried using a custom function like this one ? Really helped me out of a pickle lately...

Try this:

• create a value list of CourseList::teacherID
• create a summary field in CourseList as sListOfTeacherID
• put the summary field into a single-row, filtered portal
• assign that field an object name

The count of teachers is 

ValueCount ( 
  FilterValues ( 
    ValueListItems ( "" ; "TeacherIDVL" ) ; 
    GetLayoutObjectAttribute ( "objectNameOfRelatedASummaryField" ; "content" ) 
  ) 
)

 

  • Author

Try this:

• create a value list of CourseList::teacherID
• create a summary field in CourseList as sListOfTeacherID
• put the summary field into a single-row, filtered portal
• assign that field an object name

The count of teachers is 

ValueCount ( 
  FilterValues ( 
    ValueListItems ( "" ; "TeacherIDVL" ) ; 
    GetLayoutObjectAttribute ( "objectNameOfRelatedASummaryField" ; "content" ) 
  ) 
)

 

I was so close to this initially, and I still cannot get it to function. The portal will show the (11) sections (and the portal count will show 11.) However, when I create the summary field as a list of Teacher IDs, I get duplicate IDs.

 

Sorry - of course duplicates are listed - thus the idea of the filter values. I just cannot get the count to work properly. I changed the info you gave to include get(FileName), instead of "" for the location of the value list and it initially counted correctly. I then realized that changing it back to "" would also update the field and count correctly... so... what I am finding is that the field is not updating when I change the dropdown criteria. I am not storing the results and tried to put a script trigger to commit records, but does not seem to work. Any Ideas?

If you have a created a calculation field with this formula, make sure it is set to unstored.

  • Author

Thanks eos.

I thought I had done so - but I had not. All works well now

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.