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.

Bizarre Script Behavior

Featured Replies

First thing is that this script is working fine in OS X (10.5) FM 9.0v3 and fine On Vista when Script Debugger is active. It only fails to work on Vista if I let it run automatically.

The issues is with setting a global field to a specific value. Here is how it supposed to work (and works most of the time). From a drop down a person chooses the name of a letter to be printed and presses a button I've defined to print.

It the script sets 3 local variables $LetterName, $Contact_ID, $Researcher

Opens a new window

Goes to Letter Layout

Sets Field for $LetterName

Sets Field for $ContactID

Sets Field for $Reseacher

Enters Preview Mode

(no automatic printing.)

Once this is all done I set the global field were the letter name comes from back to a default value of "Choose Letter Name"

To test I've inserted a Pause into my script right before it enters Preview Mode and for the duration of the pause things look good. But once it changes to Preview Mode somehow the Letter Name field gets set to my default value of "Choose Letter Name"

But like I've said thing work perfectly on OS X and with debugger running but in vista with just FM Pro Client it fails.

Any suggestions or Ideas?

Below is the acutal sript code.

#Prints Only the Current Record 

Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ] 

[ Restore; No dialog ] 

Set Variable [ $$window_name; Value:$$Letter ] 

Set Variable [ $Contact_ID; Value:Contacts::Contact_ID ] 

Set Variable [ $FSR; Value:Axial Data::FSR_Name ] 

Set Variable [ $$Letter; Value:globals::zgLetterName ] 

New Window [ Name: $$window_name ] 

Go to Layout [ “Letters - Single Page” (globals) ] 

Set Field [ globals::zgContact_ID; $Contact_ID ] 

Set Field [ globals::zgLetterName; $$Letter ] 

Pause/Resume Script [ Duration (seconds): 2 ] 

Set Field [ globals::zg_FSR; $FSR ] 

Enter Preview Mode 

Show/Hide Status Area 

[ Hide ] 

Adjust Window 

[ Resize to Fit ] 

Perform Script [ “Center Window”; Parameter: "window" ] 

Set Field [ globals::zgLetterName; "Choose Letter" ]

Edited by Guest

  • Author

I think that maybe I've found a bug. After studying my script to try and figure out the problem I think FM on OS X and Script debugger (either Win or Mac) gives me false positive. The step were I reset the global field where I've chosen which letter to print is only happening correctly in Win/Vista.

Are your globals really globals?

Check the STORAGE options carefully.

  • Author

yeah my globals really are globals.

I've fix it and everything is working for me as expected now. I've just learned a frustrating way that I need to pay close attention to what I'm doing. Cant set the global to one thing early in the script and set it to something else later in the script and expect it to work. Yet it does work in a couple places, go figure.

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.