Brainiac58 Posted December 29, 2006 Share Posted December 29, 2006 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”] Link to comment Share on other sites More sharing options...
Fitch Posted December 29, 2006 Share Posted December 29, 2006 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” ) Link to comment Share on other sites More sharing options...
LaRetta Posted December 29, 2006 Share Posted December 29, 2006 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: Link to comment Share on other sites More sharing options...
Brainiac58 Posted December 29, 2006 Author Share Posted December 29, 2006 Thanks for the help! ??? Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6321 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now