December 13, 200619 yr 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!
December 13, 200619 yr 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
December 13, 200619 yr Author 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?
December 14, 200619 yr Yes pretty much so. Dont forget in your script to wrap it around an If statement. If Auction_status = "Current" Do steps End If
Create an account or sign in to comment