Jump to content
Server Maintenance This Week. ×

Showing items on a layout based on an If/Then statement...???


angelleye

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

Recommended Posts

Is there a way to show/hide an item on a layout based on given criteria? For instance, in our system there are times when we print a different invoice for the customer based on actual items on that invoice. We have a script that prints off an invoice and runs through If/Then check to see what items are on the invoice and decides which layout to use to print the invoice.

I'd like to the same type of thing with actual items on a layout. If I create a button on a layout, but I only want that button to show up if the field Auction_Status = 'Current' for example.

Any information on how I could do this would be greatly appreciated. Thanks!

Link to comment
Share on other sites

There are two ways you can go about doing this.

The first and easier method is to display the button image via a calculation with a container result. Something like Case ( Auction_Status = "Current"; gImgButton ) Then the script would be on the container and the script would do nothing if Auction_Status <> "Current". However, this still allows users to click on the button even though it does nothing and does not display the button image.

The second way is to remove the item completely but in order to do that, you need to setup a relationship for the button and a portal to display it. If the relationship is valid, then it will display the button, if it does not nothing will show. Method seen here

Link to comment
Share on other sites

However, this still allows users to click on the button even though it does nothing and does not display the button image.

So the button would actually not show up at all doing it this way, but that little spot where it would be is still clickable...though it does nothing..?? So basically moving the cursor over the empty spot where the button WOULD show up still changes it to a clickable cursor...but nothing would happen otherwise?

Then when the Case statement was true it would display the button, and clicking it would activate the script attached to it..??

am I understanding that correctly?

Link to comment
Share on other sites

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