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

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

Recommended Posts

Posted

Here's my problem, with my database when people want to perform a find, the layout swtiches to the main layout. But it doesn't work with all my layouts, it only works with layouts that are in browse mode, those that are in preview mode (printable ones) don't switch to the main layout, here's my script:

Set Error Capture (On)

If("Status(CurrentMode)=0")

If("Status(CurrentLayoutName)="List" or "Help" or "Labels" or "Table"")

Perform Script(Sub-Scripts, "Go to Main Layout")

End if

Enter Find Mode(Pause)

End if

.....

The layouts that are in browse mode are List, Help and Table but my Labels layout won't switch to the main layout when I perform a find.

My guess is that the problem is with the mode of the layout but I cannot find the solution!! =(

Anyone can give me a hand here?

Thanks

Posted

If[ Status(CurrentLayoutName)="List" or "Help" or "Labels" or "Table" ] won't work either.

If[ Status(CurrentLayoutName) = "List" or Status(CurrentLayoutName) = "Help" or Status(CurrentLayoutName) = "Labels" or Status(CurrentLayoutName) = "Table" ] will.

Alternately, If [ PatternCount( "

Posted

Why are you adding the line: If("Status(CurrentMode)=0") ... if you want the script to also switch to Main Layout if in Preview Mode?

Change that line to:

If("not Status(CurrentMode)=1")

Browse is 0, Find is 1 and Preview is 2. The above will switch to Main Layout except if the User is currently in Find Mode on the existing layout. Is this what you were attempting to protect against? I'm unclear why that If[] test is there at all.

Then correct your script as Queue has indicated - that PatternCount is very clever and yours wouldn't work even if you fixed your Browse issue. After that, you should be in business.

Posted

I'm curious, are you activating this via button? If so, it wouldn't work in Preview Mode anyway since buttons are unavailable.

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