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.

Using "if" and "else" statements in a script

Featured Replies

I am trying to allow an office staff to enter codes throughout the day, and run a script at the end of the day that prints out letters to be sent. For example, in the field "code" the number "1" would print out a letter confirming an appointment date and time for a patient. The number "2" might print a letter to a patient that missed an appointment. The script I wrote is as follows.

find all

enter find mode

insert text (specify "code" field)>0

Perform find

loop

if "code = "1""

go to layout "confirm appointment"

Print (no dialogue)

Else

if "code = "2""

go to layout "missed appointment"

Print (no dialogue)

Go to record Next

end loop

end if

end if

The end result is not what I want? I expected to get letters to patients with new appointment, and different letters to different patients who missed appointment. I am getting multiple copies of the same letter to the same patient as if my loop or my "if" statement is not working. Any advice would be appreciated.

Your If's are inside the loop and the End If's are outside the loop. You need to have your end loop after the last End If.

For the sake of efficiency, why not do a find for code = 1 and print all those letters at once. Then, do a find code=2 and print all those letters. Then you don't need any If's or loops.

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.