Jump 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.

Featured Replies

Hello All,

I don't seem to be able to find out why a script that I have created to change from one layout to another doesn't work.

I have 3 different layouts for 3 different products that I sell. If I create a new record I have created a script that upon clicking the button "new record" it asks me if I want product one, two or three. After selection a field called "BOOKING TYPE" sets itself to product 1,2,or 3 which triggers another script that changes the layout accordingly.

So far so good, but now I want my buttons "next record" and "previous record" do a similar thing: lookup field "BOOKING TYPE" and if it is set to value Product 1, Product 2 or Product 3, the layout should change accordingly.

Here's the script:

Go to Record / Request / Page [Previous]

If [bOOKINGTYPE = "product one"]

Go to Layout [product one layout]

Else If [bOOKINGTYPE = "product two"]

Go to Layout [product two layout]

Else If [bOOKINGTYPE = "product three"]

Go to Layout [product three layout]

End If

It doesn't work and I can't figure out why...has anyone got a suggestion?

Thank you in advnace,

Andy

Hi Andy,

I am not sure why you are 'going to the previous record' ... what if you are on the first record? Anyway, you can handle the Go To Layout () within one test instead of several as:

Go to Layout [ by calculation ]

... and calculation would be:

Case (

BOOKINGTYPE = "product one" ; "name of your produce one layout" ;

BOOKINGTYPE = "product two" ; "name of your produce two layout" ;

BOOKINGTYPE = "product three " ; "name of your produce three layout"

)

... also, if you name your layouts the same as the BOOKINGTYPE field itself, the calculation can be simply:

Go to Layout [ by calculation ; ... and just insert your BOOKINGTYPE field ]

  • Author

Hi LaRetta,

thanks for the quick answer. Well, if I'm on the first record then I know that and I also know I can't jump beyond that record. But I usually need to do a lot of "go to previous" and "go to next" record switching and that's why the button "go to previous".

The go to layout by calc worked and I also found another error in my layouts but I got it fixed now.

Thanks again,

Andy

Create an account or sign in to comment

Important Information

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

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.