1. If you have scripts attached to the various custom menu commands (eg Find etc), then adding a clause to those ones that checks the Found Count and suggests, or undertakes, appropriate action.
2. Perhaps an On Layout Load trigger that basically does the same thing, ie checks the Found Count and then either does something useful or gives the user appropriate choices.
Are either of those options practical in your situation?
Unfortunately no because this layout is fine to have no records sometimes.
1 of 1 people found this helpful
How about a 'dummy record', in the sense of one that does - pretty much nothing - but doesn't actually get in the way? Could the layout's underlying table cope with this?
That is a good idea and would work, but each record has a large line in list view so I would get a "ghost" area where the mouse icon would turn into the hand.
Perhaps I don't need a hand icon above records.
So this is definitely < v13?
Perhaps you could have a related record count prior to going to list or as Mardi suggests an onLayoutload() trigger.
I'm not one for dummy records... they do get in the way..
Your custom menu item can say whatever you like and can be attached to a script. By default I like to set New to be New Contact or New Tenant or New Property... or whatever the native table is... It makes a lot more sense to the user. I do the same with Duplicate and Delete (not that I ever allow Delete).
This is v13. Is there something in v13 that would fix this for me?
You said that each record has a large line - perhaps you could flag this as a Hide item, (Inspector/ Data tab/ Behaviour), using a calc that 'hides' it in the 'no records' context. When it's hidden, the hand will also not appear.
Yes, 'dummy records' is dodgy but a table with no records can be troublesome.
Thanks for both of your help! They are all good ideas. I'm going to live with the dialogue box for now, they layout works fine without zero records (A zero table can be annoying sometimes but in this case it's fine). And I'm with you on renaming "New Record" to be in context.
I submitted a feature request to Filemaker and I'll leave it at that. It would be nice to be able to capture all layout errors like that via a script trigger I reckon.
What about prohibiting List view when you have zero records? The simplest way would be an OnRecordLoad triggered script which uses an If[Get ( FoundCount ) = 0 ] to go to Form View.
*You'll still get the dialog in Form View, though. So maybe that's not very helpful!
**OK, a little more testing...In List view a mouse click triggers the dialog. In Form view a keystroke does. So, an OnRecordLoad trigger as above will get you to Form view. Then an OnLayoutKeystroke triggered script that If [ Get ( foundCount ) = 0 ] Exit Script [ False} End If
That may do it...
I had the same problem when my window showed no records. Clicking mouse inside the empty space will bring up the message. My scenario is in a "List View" of registered people, I can populate this window for different conditions controlled by buttons (Bottom Navigation Part).
My particular solution was using the "Enter Find Mode" step. Staying in this mode for an empty FoundSet until it changes, the annoying message no longer appears by clicking the mouse, Must use "Hiding Objects when" with "Apply in Find Mode" selected for all fields and Objects. No Dummy or ghost Record.
Hope this helps...
Thanks let me try this