Pop-up menus are great in some instances, but they're clunky as hell in others.
Mike gave me one tip for limiting my staff list to ONLY active staff members.
The trick is when someone no longer works there, the Pop-Up Menu shows the staff member's primary key, instead of their name (UPDATE FOR CLARITY: using an active toggle on the no longer employed staff).
Is there some easy/smart workaround for this?
What I usually do is make two fields for every pop-up, one on top which shows ALL staff, but isn't editable in browse mode, and one below it that's editable that only shows active staff members.
Another idea I've had is to run a SQL command (either on startup, or nightly plus whenever a staff member's status changes) which finds all ACTIVE employees sorted alphabetically, and then all INACTIVE employees sorted alphabetically and set a field in my "settings" table called "StaffIDs" which basically looks like this:
- this is the user that clears it
ActiveStaff1_Primary Key
ActiveStaff2_Primary Key
A join table between your staff table and the table where the staff name comes up. Deleting a record on either side of the join table deletes the join table record too.
You are destroying data. Often this is not good. Better to have a field, such as “status” which can carry a value. The values could be Booleans or labels. For your value lists you use a calculation field with something like:
If ( status = “active” ; primaryKey )
You then base the first field of your value lists on this calculated field. Only “active” staff will appear in your list.
The problem happens when someone is no longer a staff member of there's still a record of things they've done, and I'm wondering how other people solve this problem. In this case (for example) past employees have taught classes, and issued credit to students, and done parent conferences, and student conferences.
If this is something you've encountered before I'd love for some ideas of your best practices. The solution I'm using is stacking two fields on top of each other with two different value lists, but I'm wondering if there are better ways.
I was wondering about making a pre-made value list, but then it can't have two values. I guess I could sort on Active vs inactive, and show all active on the top and make a bogus staff member named "---" or something to add a line between the two. I was able to do this by having another calc field called "NameForTwoWaySort_c" which puts a space in front of every active users' name so they sort to the top like this:
You need to have at least two lists, one of active staff, to ensure that you aren't introducing errors as you create new data. The other is all staff ever, so that you have a correct historical record.
The places where you need to have a permanent record are not always the same places that you do data entry. When you separate data entry from data display the problem disappears.
That's what I've been doing, but I was wondering if there was a better way to do it than the two overlapping fields and two value lists. I haven't implemented the other model that I showed in my demo where it shows all active and then all inactive yet, but it seems like a potentially better solution in some instances.
I was just wondering what other solutions people have.
We are always keep the id and actual value for example now the full name. And we dont use the popup menu to cover the id with the value. Basically we use card window pickers and the user selects and we enter the id and value. So in list views or portals that we put sort buttons to sort correctly in universal mode and not to use value list sort etc.