Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Navigate to correct layout based on Value List Selection

Featured Replies

  • Newbies

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!

Try the construct:

If

ElseIF

ElseIF

EndIF

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

  • Author
  • Newbies

Thank you so much for that solution!! It worked perfectly! I'm used to writing formulas in Excel so ElseIf is new to me.

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:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.