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.

Scripting beyond my knowledge

Featured Replies

I'm creating a database for the law firm I work for. I've set up a drop-down menu listing the different types of documents that are written. There's about 20 different documents so I really didn't want to create individual buttons. What I would like is to choose a document off of the menu and then press "go." I know there's a way to do this. It's just not coming to me. Any suggestions?

Hi Oscar,

I am a little unclear what you mean. What would you like to happen when you press 'Go' ?

Phil

  • Author

Here's the plan:

1. Choose document to create from menu, i.e. Fax, letter, etc.

2. Click "go" button.

3. DB goes to layout corresponding to menu choice.

Now, here's the tricky part (for me anyway). The document is part of a related database, since we are required to keep track of any document produced related to a case. Therefore, the corresponding layout is in another database. Now, the setup described above is part of a portal. Everything else about it runs perfect. It's just this one little script that giving me a hard time.

Edited by Guest

Oscar

Sorry, I haven't got the time to go through this step by step at the moment but here is an overview of what you have to do.

Put a button on the first line of your portal.

Attach a script to this button that calls an external script that resides in the related file of the portal. It might be a series of if's ie

if your menu field = 'Fax'

Go to layout fax

endif

If your menu field = 'letter'

Go to layout letter

endif

etc.

Hope that helps for now but if you need further help get back to me and I will give you a more detailed description in the morning

Regards

Phil

  • Author

Hmmm...That got it to work. Sort of. What I'm trying to do make so that what layout in the child db is dependent on what choice is made in the drop down menu, i.e., "Fax to Client" is chosen, you click go and you are sent to the "Fax to Client" layout. If "Fax to Opposing Counsel" is selected, you're taken to the "Fax to Opposing Counsel" layout.

For some reason, regardless of the choice on the drop-down menu, you get taken to the exact same layout. It seems the "if" function is merely a true/false option and I need about 10 choices.

Reading the help file, I'm starting to think FM might not be able to do this.

Edited by Guest

Hi Oscar,

FM can DEFINITELY do what you want.

Try putting a 'Go to Related record' step in the script in the first file before the perform external script step (sorry I should have mentioned this last night).

This will move the record pointer in the related file (the one in the portal) to the record that the button is next to in the portal.

When the external script is now called, the active record will be the one that you selected via the go button in the portal so when your if statements are checking for which layout to go to they will be checking the record that you selected and so should act accordingly.

Without the go to related record step the record pointer in the related file never moves hence you were always taken to the same layout

Further, you are correct that the if function is a true false function so you will need 10 of them. After each go to layout step also include an exit script step.

if your menu field = 'letter'

go to layout letter

exit script

endif

...repeat 10 times with relevant choices

The script will now step down through the 10 options until it has found one to be correct. It will then take you to the correct layout and then get you out of the script

HTH

Phil

  • Author

Hmmm....didn't help. I'm wondering if it is in how I am naming things. I know FM can be very picky about /'s and such. Here is my script:

1. If["Document Type = "Fax/Counsel""]

2. Toggle Window [Minimize]

3. Go to Related Record ["GME2"]

4. Perform Script [sub-Script, External:"GME2.fp6] <-This is my script to send to "Fax Counsel" layout.

5. Exit Script

6. EndIf

7. If["Document Type = "Fax/Client""]

8. Toggle Window [Minimize]

9. Go to Related Record ["GME2"]

10. Perform Script [sub-Script, External:"GME2.fp6] <-This is my script to send to "Fax Client" layout.

11. Exit Script

12. EndIf

Now, I know it's partially working because none of the other choices in the drop-down menu take you anywhere when you press "Go."

I'm thinking there's another way around it. Instead of individual choices for Fax/Client, Fax/Counsel, etc. I could just use Fax and then, give the options of Client, Counsel, etc. in the child file.

I don't think there is a Toggle Window [ Minimize ] option (at least not in OS X.) But if that's the same as Toggle Window [ Hide ], it may the problem. That would cause the focus to be lost before the Go to Related Record, so it wouldn't be on the selected portal row anymore.

Try moving the Toggle Window to be after the Go to Related Record.

  • Author

I just removed the Toggles altogether. Same problem exists. This is strange because I have scripts with Toggles throughout, but this is the only one that is giving me trouble. It keeps returning to the parent file.

Is the only problem that it returns to the parent file? Do the subscripts execute correctly? Can you put something in the If[] statements to tell if they are branching correctly?

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.