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

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

Recommended Posts

  • Newbies
Posted

I'm having a problem with what I thought would be a simple script. Currently I have 4 different contracts defined in a value list. The user selects the desired contract and then clicks on the "Go to Contract" button that has the following script assigned. However, no matter the selection I am always going to the "Standard Purchase & Sale" contract. I tried using the Else script step between the first 2 options after the 4 individual If . . End If segments. This made no difference. What am I missing? Is there a better way to do this?

Following is a portion of the script:

Allow User Abort [Off]

Set Error Capture [On]

#

If[Property Analyzer::Contract Selection="California Contract"]

Go to Layout["California Contract - Rehab"(Property Analyzer)]

Print Setup[Restore; No dialog]

Set Zoom Level[150%]

Adjust Window[Maximize]

Else

If[Property Analyzer::Contract Selection = "Oklahoma Contract"]

Go to Layout["OK Sales & Purchase Contract - REHAB"(Property Analyzer)]

Print Setup[Restore;No dialog]

Set Zoom Level[150%]

Adjust Window[Maximize]

End If

#

If[Property Analyzer::Contract Selection = "Option Contract"]

Go to Layout["Option Contract - Rehab"(Property Analzyer)]

Print Setup[Restore;No dialog]

Set Zoom Level[150%]

Adjust Window{Maximize]

End If

Thank you for any help you can provide!

Posted

Try the construct:

If

ElseIF

ElseIF

EndIF

Set Zoom and Adjust window at end (outside of EndIf).

Posted

Good morning, Jerry!

You have another possible approach here if you make sure your value list of contracts matches your layout names (either adjust one or the other). Make your Contract Selection field a global, fire by button or script trigger, and then script could simply be:

Allow User Abort [Off]

Set Error Capture [On]

Go to Layout[ by calculation ; Property Analyzer::gContract Selection

Print Setup[Restore; No dialog]

Set Zoom Level[150%]

Adjust Window[Maximize]

Even if you decide to keep the If/Else/ElseIf construct for the layout scrip-step, you might consider moving the last three lines to the end ( after the EndIf). Since they appear to be exactly the same for all three contracts, you only need to list them once.

If you use Go To Layout [by Calculation] then you must remember to keep your value list name and contract's layout name the same. :smile2:

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