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.

question on If/Else If script

Featured Replies

Hello-FileMakerPro novice looking for some help.

I read the whitepaper for novices and am taking its advice and I'm trying to design my database on paper before I create it. Part of my database will determine if case managers met time requirements for responding to a referral for service.

I am trying to develop a script that will return either a "yes" if the timeline was met, "no" if the timeline was not met, or "na" if the referral could not be acted on for some reason.

What I came up with is listed below. Any advice would be greatly appreciated.

Table #1: IntakeReferrals

This table will hold data related to intake referrals. It will have a relationship to the CaseManager table since it contains performance data for the case managers.

Fields

•ReferralName-(text)

•ReferralPhoto-(container)

•DOB-(date)

•Diagnosis-(text)

•PCEODate-(date) date referral received by P/CEO.

•CSADate-(date) date referral received by CSA.

•CMDate-(date) date received by CM/QMRP.

•CMFName-(text) First name of Case manager assigned to the referral.

•CMLName-(text) First name of Case manager assigned to the referral.

•PhoneContact-(date) date that CM made first phone contact.

•PhoneDays-(calculation) PhoneContact-CMDate.

•PhoneOnTime-(calculation) Returns “Yes” if PhoneDays <=1 (day); Returns “No” if PhoneDays > 1; Returns “NA” if PhoneDays has no value.

Script: ReturnYNNa

If [intakeReferrals::PhoneDays<=1]

Perform Script [ReturnYes]

Else If [intakeReferrals::PhoneDays>1]

Perform Script [ReturnNo]

Else If [intakeReferrals::PhoneDays=” “]

Perform Script [ReturnNA]

End If

Script: ReturnYes

Insert Text [select;IntakeReferrals::PhoneOnTime; “Yes”]

Script: ReturnNo

Insert Text [select;IntakeReferrals::PhoneOnTime; “No”]

Script: ReturnNA

Insert Text [select;IntakeReferrals::PhoneOnTime; “NA”]

You don't necessarily need a script for this; the PhoneOnTime field could be either a calculated field, or it could auto enter a calculation:

Case( PhoneDays <=1 ; “Yes” ; PhoneDays > 1 ; "No" ; “NA” )

Tom is right in that you don't need a script for this but for future ... it is better to use Set Field[] rather than Insert Text[]. Set Field[] doesn't require the field be on the layout; Insert Text[] does. :wink2:

  • Author

Thanks for the help! ???

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.