Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


This topic is 6477 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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.

Posted

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

Posted

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.

Posted

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

Posted

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?

Posted

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.

This topic is 6477 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.