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.

Layout based on a field value

Featured Replies

OK, I don't know quite what category this falls into, so I'll put it here in the general section. I guess you'd call it a navigation problem.

I want users to go to a layout based on a field value. So on layout number #1 they enter VarA as X or Y. They click a button that takes them to layout #2 if VarA is X, or layout #3 if VarA is Y. So far, so good.

But suppose they are on layout #2. They then browse to the next record, which has a VarA value of Y. They are still on layout #2, but I'd like them to be on layout #3 since VarA = Y.

Is there any way around this? Can I force them to the proper layout, #2 or #3, as they browse, depending on VarA's value?

Thanks for any help,

Dan

Hi Dan,

> I don't know quite what category this falls into...

-snip-

Probably scripting forum, as I think that is what you are trying to do.

If so, I've attached a small file called DoIt to show how this can be done.

HTH

Lee

smile.gif

DoIt.FP5.zip

  • Author

No, I don't think that's it. I get it to go to the proper layout the first time using a script, which is pretty much what your DoIt file shows. The problem is if a user manually scrolls through records they'll end up seeing a layout for a record that they never should.

My workaround for the moment is to create a calculating container field that is empty if the user should be seeing the layout, but if they shouldn't see it for the record in question, it displays a large rectangle that blocks out all of the fields and shows them a message that gets them to re-navigate to the proper layout. It's not too elegant, but I guess it works.

If only FM supported event triggers, this would be no problem. As soon as the user changed the record I'd run the script to make sure they were looking at the right layout. Is there any talk of event triggers being added to future versions of FM? Coming to FM from Access, I really miss them. Oh well. I can dream.

Thanks for the input, Lee.

Dan

Hi,

Try locking the status area and make your own navigation buttons with tabs and arrows. A script attached to it will check all this for you and you'll have :

1. A cleaner solution

2. A wider solution (as Status takes some greu ugly space at left side of the screen)

Ugo has it in one. You have to prevent users from changing their current record. Hiding and locking (it's gotta be locked) the status area is the only way to go.

Well, there is another way: only ever let the user browse one record at a time (show all records, omit record, show omitted) but for this to be 100% robust you'll probably have to lock out the menus and status area anyway.

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.