Jump to content
Server Maintenance This Week. ×

Conditional formatting of button


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

Recommended Posts

I have a several identical buttons (Jobs, Vehicles, Tasks, etc.) that I'm using for navigation among layouts. All of this works OK, but here's what I'm wondering:

If I give each button an object name that corresponds to a layout name, can I use conditional formatting to give that button a different formatting when that particular layout is active? In other words, if I assign the Jobs button the name JobsDetail, can I change the formatting of the Jobs button when the JobsDetail active is active?

I generally know how to use conditional formatting but don't know how to set up this particular formula.

Thanks for any help.

James

www.james-mc.com

Link to comment
Share on other sites

Conditionally format the button itself.

Formula: Get ( LayoutName ) = "Job"

Then if the current layout is Job then it should work.

Link to comment
Share on other sites

  • 1 month later...

I wanted to take this a step further and omit the need to hardcode at all (actually, to allow more flexibility). And Mr. Vodka solved it was well, so I wanted to include it here:

If you name your buttons the same as your layouts, ie, Customers, Invoices, Products, Preferences etc, then you can use Self. Self refers to the button text. So conditional format can be formula:

Get ( LayoutName ) = Self

Then change the text color to highlight. In this way, all buttons can have the same conditional format. You will need to be careful if you change layout names but this should work well in many instances. Of course there is still 'hardcoding' because the button text is the hardcode. But button text can also be merge fields, calculations etc.

Edited by Guest
Link to comment
Share on other sites

I wanted to take this a step further and omit the need to hardcode at all

This works well, LaRetta, with one small adaptation. Since I'm naming my layouts as Jobs Detail, Jobs List, Vehicles Detail, etc., my conditional formatting equation now looks like this:

LeftWords(Get ( LayoutName );1) = Self

Now if I just had a way to keep from hard coding specific text into the script parameter in the script attached to each button. When I click the Jobs button, for example, I'd like to have something like Self in the script parameter without having to hand code "Jobs."

Thanks for the help on this!

James

www.james-mc.com

Link to comment
Share on other sites

This topic is 5475 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.