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.

Is there a way to apply If/Then statements to layout objects...???

Featured Replies

I have a Tab Control object into my layout. One tab is Credit Card and the other is PayPal. Of course, credit card details show up in the CC tab and PayPal details show up in the PayPal tab, however, people only pay with 1 method.

So what I'd like to do is be able to have the CC tab up front on records where payment type is CC, and PayPal tab come up front on records where PayPal was used.

Possible? Any info would be great. thanks!

Hi

How do you navigate between records ?

  • Author

Just like normal with the record browsing thing on the left side of the screen. Or, we might click into a record from another related record.

Really I just need it to work no matter how we get to the record.

If Terms = "PayPal" Then

show the PayPal tab

Else

show the credit card tab

End If

Something like that.

Use Go to Object [] in your script after naming each tab with an object name.

  • Author

Well, I'm using a Tab Control object which is a single object. I can't give each tab separate names. One of those deals where you create your tabs and then whichever one you have up front when you save the layout is the one that defaults to the front. I'd like to be able to decide on the fly which one to bring to the front, though.

You have FM8.5 where it allows you to name objects. Each tab most definately can have a seperate object name. It is true that whichever tab you on when you save your layout will be the default, but in your script that makes it go to that layout, you can tell it where to go regardless of what is defaulted.

If [ Terms = "PayPal"]

Go to Object ["PaypalTab"]

Else

Go to Object ["Credit"]

End If

Something like that

  • Author

Ah, ok. When I first click on a tab the object name is grayed out. I have to click the tab a second time to actually select that tab and be able to name is. So that's cool. Thanks!

So now it works when the script is used to get to the record. Is there any possible way to make it work if I'm just scrolling through a found set of records?

Not without using a navigation button, some kind of script, or an event plugin such as zippscript. As a developer, most of the time we lock the status area to control users from making mistakes.

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.