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.

Only show actyive records in Layout

Featured Replies

Hi,

 

This might be a simple question but here goes. I've got a staff layout based ont he attached relationship. I'd like to only show those staff members with a status of Active. I've got a global variable that is set to "Active" and is linked to status field in my staff table. The values in my staff table are only Active or Leaver.

However, my layout is showing all staff, leavers included. Is there a way I can only show active staff based on the attached relationship? Do I need to do something additional to this?

 

TIA.

Relationships.png

There is a conceptual misunderstanding in your question:

A relationship doesn't determine what records are visible in a layout – which makes sense since a layout is based on a TO (table occurrence), which can be involved in multiple relationships; which of those relationships would "win" in determining the found set? In brief: any layout always lets you access all records of its base table. 

What a relationship does determine is which what records from a given TO you would see in a portal of that TO on a layout based on a related TO. In concrete terms: a portal into scdb_STAFF_active on a SchoolDatabase layout would return a related set of Staff records marked as active.

To answer your original question: if you want to filter the records on a layout (i.e. the found set), perform a Find.

Edited by eos

  • Author

Thank you.

That makes perfect sense to me now. :)

  • 5 weeks later...

Set your portal to show records based on a relationship to the staff table where records = active. To do this, create a constant global value in your schoolDB of "Active"...meaning every record has this value. Now, create a relationship to the staff table where your global = status. In other words, Active = Active. Now, only 'Active' staff records will show in the portal.

Set your portal […] Now, only 'Active' staff records will show in the portal.

​I don't see the word “portal” in the OP.

You are correct, I read it wrong. I assumed that's what the OP meant as he was looking for only certain records.

The next step you could do if you wanted to; script your find for active and then attach that to a layout trigger like OnLayoutEnter.  That way every time you go into the layout it will filter to you active employees, and if you wanted to see the others you could show all or do a manual find.

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.