home *** CD-ROM | disk | FTP | other *** search
/ PCMania 8 / PCM8.iso / filemaker / data1.cab / Templates / Tips_from_Tech_Support / Calculations and Scripts.fp5 (.txt)
Encoding:
FileMaker Pro Database  |  2000-02-01  |  173.0 KB  |  2,927 lines

  1.  Copyright 1984-1998 FileMaker, Inc. 
  2. HBAM2016AUG95
  3. Pro 5.0
  4. HBAM3016AUG95@
  5. calculation
  6. script
  7. basedC
  8. betweenG
  9. blankB
  10. buildingA
  11. building
  12. calculations
  13. nested
  14. statementsA
  15. calculatingB
  16. calculating
  17. blank
  18. instead
  19. calculating
  20. future
  21. based
  22. weeksC
  23. calculating
  24. finish
  25. start
  26. number
  27. calculating
  28. person's
  29. calculating
  30. elapsed
  31. ending
  32. later
  33. calculating
  34. number
  35. weekdays
  36. between
  37. datesG
  38. calculationsA
  39. caseH
  40. comparisonH
  41. comparison
  42. statementsH
  43. dateC
  44. datesG
  45. daysD
  46. elapsedF
  47. endingF
  48. finishD
  49. fromD
  50. futureC
  51. insteadB
  52. laterF
  53. nestedA
  54. numberD
  55. person'sE
  56. startD
  57. statementsA
  58. timeF
  59. weekdaysG
  60. weeksC
  61. whenF
  62. withA
  63. workD
  64. zeroB
  65. scripts
  66. Calculation
  67. Building Calculations With Nested IF Statements
  68. When creating calculations using nested IF statements, it is important to recognize that no matter how complex they look, they can always be broken down into single IF statements.
  69. The syntax for an IF statement in FileMaker Pro is:
  70.      If (test, result one, result two)
  71. It might be easier to think of an IF statement as a yes/no question that determines the next action taken:
  72.      If (question, do this if the answer is yes, do this if the a
  73. 3.  If EndDate occurs on a day of the week before StartDate, then subtract the 2 weekend days.
  74. This formula provides an accurate calculation of the work days between any two work dates. It assumes that StartDate is earlier than (or the same as) EndDate. If you want Monday through Tuesday to return 2 work 
  75. Arial
  76. MS Sans Serif
  77. Times New Roman
  78. Wednesday
  79. Thursday
  80. Friday
  81. Saturday
  82. January
  83. February
  84. March
  85. April
  86. August
  87.     September
  88. October
  89. November
  90. December
  91. 1st Quarter
  92. 2nd Quarter
  93. 3rd Quarter
  94. 4th Quarter
  95. 5/5/999
  96. Pro 3.0 - 4.1F!
  97. Pro 5.0
  98. CALCULATION
  99. CATEGORY
  100.     CLIENT ID
  101. CONTENT
  102. DATE FIELD
  103. DUPLICATE CHECK GLOBAL
  104. EMAIL ADDRESS
  105. EMAIL TO
  106. FIRST NAME
  107. L PAGES
  108. CategoryB
  109. ContentB
  110. NotesB
  111. CalculationB
  112. SubjectB
  113. TitleB
  114. Search
  115. TechInfoB
  116. InformationB
  117. Total PagesB
  118. A    Client IDB
  119. MarkB
  120. Duplicate Check Global
  121. ome sample formulas.  It should be noted that a number field or calculation with a result being a number,  may be formatted to be blank if the value to be displayed is zero.
  122. Number Calculation that results in a blank instead of a zero if any field in the formula is blank:
  123. If (Hours Worked * Rate > 0,Hours Worked * Rate,TextToNum (""))
  124.  or (same formula, shorter version)
  125. If (Hours Worked * Rate,Hours Worked * Rate,TextToNum (""))
  126. -- In this example, if either Hours Worked or Rate is blank, the calculation results in a blank. 
  127. Date Calculation that results in a blank instead of 00/00/0000 or  "?" displayed  if any field in the formula is blank:
  128. If (Shipdate > 
  129. .com>
  130. G;Send Mail: Including the Recipient Name in an Email Message
  131. starting
  132. calculating
  133. elapsed
  134. ending
  135. later
  136. calculating
  137. number
  138. weekdays
  139. between
  140. dates
  141. combining
  142. fields
  143. single
  144. field
  145. concatenati
  146. finding
  147. range
  148. dates
  149. using
  150. scriptmaker
  151. fourteen
  152. scriptmaker
  153. printing
  154. total
  155. numbers
  156. script
  157. serializing
  158. records
  159. category
  160. using
  161. relationsh
  162. MS Sans Serif
  163. Times New Roman
  164. Courier
  165. (LIST
  166. LISTA
  167. Calculation
  168. Script
  169. VDEFA(
  170. (LIST
  171. LISTA
  172. Logical
  173. VDEFA(
  174. CategoryB
  175. Subject
  176.  for any desired weekday for any desired number of weeks in the future.  
  177. As a convenience, sample formulas to return each weekday 4 weeks in the future are provided below.
  178. To return the Monday 4 weeks in the future, use:
  179. OrderDate + 28 + Middle ("1065432",
  180.  Mod (OrderDate - Date (1, 3, 1904), 7) + 1, 1)
  181. To return the Tuesday 4 weeks in the fu
  182. ture, use:
  183. OrderDate + 28 + Middle ("2106543",
  184.  Mod (OrderDate - Date (1, 3, 1904), 7) + 1, 1)
  185. To return the Wednesday 4 weeks in the future, use:
  186. OrderDate + 28 + Middle ("3210654",
  187.  Mod (OrderDate - Date (1, 3, 1904), 7) + 1, 1)
  188. To return the Thursday 4 weeks in the future, use:
  189. OrderDate + 28 + Middle ("4321065",
  190.  Mod (OrderDate - Date (1, 3, 1904), 7) + 1, 1)
  191. To return the Friday 4 weeks in the future, use:
  192. OrderDate + 28 + Middle ("1065432",
  193.  DayOfWeek (OrderDate), 1)
  194. Calculation
  195. To use this calculation you must create 2 fields:
  196. StartDate (Date)
  197. Days (Number)
  198. To find a date in the future, you simply add the number of days in the future to the existing date.
  199. DaysFuture (Calculation, Date result) = 
  200. StartDate + Days
  201. If StartDate was January 1, 1999 and the field Days contained a 7 the result of this calculation would be January 8, 1999.
  202. DaysFuture (Calculation, Date result) = 
  203. StartDate + Days
  204. tDate + Days
  205. If StartDate was January 1, 1999 and the field Days contained a 7 the result of this calculation would be January 8, 1999.
  206. DaysFuture (Calculation, Date result) = 
  207. StartDate + Days
  208. * A text field, called Mark. When th
  209. statusI
  210. suffixJ
  211. textN
  212. self-join
  213. relationship
  214. examples
  215. timeF
  216. tipsQ
  217. titleJ
  218. totalP
  219. usingI
  220. weekdaysG
  221. whatU
  222. whenF
  223. withA
  224. workD
  225. zeroB
  226. logical
  227. scripts
  228. Pro 4.0, you can create a calculation (see below)  and set up the Send Mail script step to use this field. Send Mail will placlac
  229.  the day of the week:
  230. Work Days           0      1       2       3       4
  231. Sunday                1       2       3       4       5
  232. Monday               0        1      2       3      4 
  233. Tuesday             0        1      2       3      6
  234. Wednesday      0        1      2       5      6
  235. Thursday            0        1      4       5      6
  236. Friday                    0        3      4       5      6
  237. To determine the day of the week for StartDate, we can use the Mod() function (with
  238. DateG
  239. Finding Future Dates
  240. Calculation
  241. You may wish to create a text calculation field that includes a numeric result, with a formatted number. However, a text calculation field cannot be formatted using the Format Number command (e.g.- you cannot display a fixed number of decimal places in a text field). To get around this problem, you can create a calculation field with a text result, and build the number formatting into the calculation. An example of how to do this follows.
  242. This calculation assumes that you have a number fB
  243. ield named:
  244. Numberfield
  245. Balance Due (calculation, text) = 
  246. "Your Current Balance is: $" & Int (Round (Numberfield,2)) & "." & Right (Round (Numberfield,2) * 100,2) 
  247. er formatting into the calculation. An example of how to do this follows.
  248. This calculation assumes that you have a number f as
  249. extractingJ
  250. extracting
  251. title
  252. first
  253. middle
  254. suffix
  255. fieldJ
  256. findI
  257. findingK
  258. finding
  259. range
  260. dates
  261. using
  262. scriptmakerK
  263. finding
  264. duplicate
  265. recordsL
  266. finding
  267. future
  268. datesM
  269. finishD
  270. firstJ
  271. formattingN
  272. formatting
  273. numbers
  274. calculation
  275. fieldN
  276. fromD
  277. functionsI
  278. futureM
  279. includingR
  280. insteadB
  281. lastJ
  282. laterF
  283. mailR
  284. messageR
  285. middleJ
  286. nameJ
  287. nestedA
  288. numberD
  289. numbersN
  290. pageP
  291. person'sE
  292. printingP
  293. printing
  294. total
  295. numbers
  296. scriptP
  297. rangeK
  298. recipientR
  299. recordsL
  300. relationshipT
  301. scriptI
  302. scriptmakerK
  303. scriptmaker
  304. tipsQ
  305. selfT
  306. self-joinU
  307. sendR
  308. including
  309. recipient
  310. email
  311. messageR
  312. serializingS
  313. serializing
  314. records
  315. category
  316. using
  317. scriptS
  318. leftA
  319. leftwordsJ
  320. lessA
  321. let'sA
  322. levelA
  323. likeA
  324. lineU
  325. listL
  326. listingU
  327. listviewU
  328. logicD
  329. longerF
  330. lookA
  331. lookedA
  332. lookingQ
  333. looksA
  334. loopL
  335. lowerA
  336. machineQ
  337. macintoshD
  338. mailR
  339. mainU
  340. makeB
  341. makesA
  342. manyA
  343. markL
  344. matchL
  345. match-fieldU
  346. matchingQ
  347. matchingrecordsU
  348. mondayD
  349. monthE
  350. monthsE
  351. moreA
  352. moveD
  353. multipleD
  354. multiple
  355. record
  356. viewI
  357. multiplesD
  358. multiplyD
  359. nameJ
  360. namedD
  361. namesJ
  362. needF
  363. neededA
  364. needsH
  365. nestedA
  366. nestsA
  367. nextA
  368. noteF
  369. notedB
  370. numberA
  371. numtotextE
  372. obtainD
  373. obtainedE
  374. occursD
  375. onesA
  376. onlyA
  377. optimallyA
  378. orderL
  379. ordinaryJ
  380. originalJ
  381. otherH
  382. overA
  383. Arial
  384. MS Sans Serif
  385. Times New Roman
  386. Courier
  387. Verdana
  388.     Helvetica
  389. Palatino
  390. Times
  391. Geneva
  392. Arial
  393. MS Sans Serif
  394. Times New Roman
  395. Courier
  396. Verdana
  397.     Helvetica
  398. Palatino
  399. Times
  400. Geneva
  401. Palatino
  402. Times
  403. Geneva
  404. Times
  405. Geneva
  406. Geneva
  407. Geneva
  408. Extra: If you want to be able to enter a negative number of work days as well as a positive number of workdays then use the following formula:
  409. Case(WorkDays < 0, startdate + Int(WorkDays / 5) * 7 - 
  410. Middle("23456034560145601256012360123412345",(DayofWeek(startdate) - 1) * 5 + 
  411. Mod(Abs(WorkDays), 5) + 1,1), startdate + Int(WorkDays / 5) * 7 + Middle("12345012340123601256014560345623456",(DayofWeek(startdate) - 1) * 5 + Mod(WorkDays, 5) + 1,1))
  412. StartDate + Int (WorkDays/5) * 7 +
  413.   Middle ("12345012340123601256014560345623456",
  414.   (DayOfWeek (StartDate) - 1) * 5 +
  415.   Mod (WorkDays,5) + 1, 1)E
  416. DateGECalculating a Finish Date from a Start Date & the Number of Work Days
  417. Calculation
  418. ver the five day multiples.  That is,
  419.      Mod (WorkDays,5)
  420. The difficult step is logic step #3 - determining if the excess days takes us across a week
  421.  can also specify related fields within many script steps giving you access to related data.
  422.   When you use the Cut, Copy, Paste, Clear,Paste Result, Paste from Index, Paste from Last Record, or Paste Current Date/Time/User steps, Set Field, there is no need to use a Go to Field step first; all of these commands allow you to specify a field for the operation.
  423.   Remember that if you use the Relookup command, and you're using a calculation field as the matching value, you must specify on
  424. e of the input fields for the calculation as the field parameter for the Relookup, not the calculation field (calculation fields cannot be used for the Relookup command).
  425.   When you use the Copy command without any parameters, it copies all values from all fields on the current layout. If you use the Paste command, all of the data will paste into one field. There is no way to force FileMaker to paste the data into each destination field, though you could paste into a word processor, save
  426. Script
  427. What it is:
  428. A self-joining relationship is a relationship in which a file is related to itself: the main file and the related file are the same database. Any Text, Number, Date or Time field may be used as a match field.  Other potential match fields include calculation fields with stored results and Global fields (on the "left" side of the relationship only). Using these field types, self-joining relationships may be defined between two different fields or from a single field to itself.
  429. se. Any Text, Number, Date or Time field may be used as a match field.  Other potential match fields include calculation fields with stored results and Global fields (on the "left" side of the relationship only). Using these field types, self-joining relationships may be defined between two different fields or from a single field to itself.
  430. st.com>
  431. e where yo
  432. space.
  433. a space.
  434. Datee
  435. gical
  436.  as Text, and use an Import command to bring in the record (the copied information is separated by tabs).
  437.   Use the Toggle Window command to zoom the window to full size for the current screen, if you don't know how large the monitor will be on any machine. This is a good command for a startup script.
  438.   Use the Save a Copy As command to periodically back up your file. The script step can save a Clone, a Compressed Copy or just a Copy of the current file.
  439. ScriptMaker Tips
  440. already calculated, it will copy a null value. This happens because the script progresses before the summary field is given time to calculate.  
  441.   Whenever you use the Enter Find Mode command and choose to Restore Find Requests, use the Perform Find command immediately after it. Be sure to uncheck the Restore option on the Perform Find command, if any chang
  442. gical
  443. These calculations compare the value in an existing date field called "Birthdate" in conjunction with the value obtained using the Today function. 
  444. The following formula displays a person's age in
  445. the text format of "yy Years, xx Months, zz Days":
  446. Full Age
  447. FullAge (calculation, text result) = 
  448. NumToText (Year (Today) - Year (Birthdate) - If (Today < Date (Month (Birthdate), Day (Birthdate), Year (Today)), 1, 0)) & " Years, " & NumToText (Mod (Month (Today) - 
  449. Month(Birthdate) + 12 - If B
  450. (Day (Today) < Day (Birthdate), 1, 0), 12)) & " Months, " & NumToText (Day (Today) - Day (Birthdate) + If (Day (Today) >= Day (Birthdate), 0, If (Day (Today - Day (Today)) < Day (Birthdate), Day (Birthdate), Day (Today - Day (Today))))) & " Days"
  451. Import New FAQs
  452. \\ZED\DoubleDuty
  453. Script
  454. This script uses 2 layouts named:
  455. Single Record View
  456. Multiple Record View
  457. You should create both of these layouts in your database before importing this script.
  458. The following script results in one of three paths depending on how many records are found. The three possible find results are: no records, one record and many records. Here is the script:
  459. Set Error Capture [On]
  460. Enter Find Mode [Pause]
  461. Perform Find [ ]
  462. If ["Status(CurrentFoundCount) = 1"]
  463. Go to Layout ["Single Record View"]
  464. ElseB
  465. If ["Status(CurrentFoundCount) = 0"]
  466. Show Message ["No records were found"]
  467. Go to Layout ["Multiple Record View"]
  468. End If
  469. End If
  470. Import the script "Conditional Find Script using Status Functions", and modify it for use with your database.
  471. 1. It finds all records, and then sorts them by the ClientID field so that records with the same Client ID are grouped together.
  472. 2. Starting with the first record, the script copies the value from the ClientID field into the Duplicate Check Global field.
  473. 3. The script goes to the next record and compares the value in ClientID with the value in Duplicate Check Global.
  474. * If the values match, the record is a duplicate, the script puts an X in the Mark field .
  475. * If the values don't match,
  476. . FileMaker Pro copies the Client ID value into Duplicate Check Global. It doesn't change the Mark field.
  477. 4. The script repeats step 3 until it reaches the last record in the file.
  478. 5. The script finds all records with an X in the Mark field, and then displays the found set of the duplicate records.
  479. nd []
  480. When you perform the Find Duplicates script:
  481. Script
  482.  The Send Mail script step allows you to specify field values for the different fields in
  483.  your email messages. The "To:" field, for example, could take values from the Email
  484.  Address field.
  485.  If you wish to include the recipient name along with the email address in email messages sent from FileMaker Pro, you can create a calculation (see below) and set up the Send Mail script step to use this field. Send Mail will place the recipient name into the recipient area and the email address in u wish to include the recipient name along with the email address in email messages sent from FileMaker Pro, you can create a calculation (see below) and set up the Send Mail script step to use this field. Send Mail will place the recipient name into the recipient area and the email address in 
  486. he Enter Find Mode command and choose to Restore Find Requests, use the Perform Find command immediately after it. Be sure to uncheck the Restore option on the Perform Find command, if any chan
  487. Calculation
  488. (calculation, text result) =
  489. NumToText (Year (Today) - Year (Birthdate) - If (Today < Date (Month (Birthdate), Day (Birthdate), Year (Today)), 1, 0)) & " Years, " & NumToText (Mod (Month (Today) - Month
  490. (Birthdate) + 12 - If (Day (Today) < Day (Birthdate), 1, 0), 12)) & " Months, " & NumToText (Day (Today) - Day (Birthdate) + If (Day (Today) >= Day (Birthdate), 0, If (Day (Today -
  491. Day (Today)) < Day (Birthdate), Day (Birthdate), Day (Today - Day (Today))))) & " Days"
  492. DateG
  493. Calculating a Person's Age
  494. Calculation
  495. k of your medicine
  496. cabinet. 
  497. A special note about the Today function. 
  498. The Today function calculates every time you open your database. If your database stays open for more than a day, then the Today function may not actually give you today's date but
  499. rather the date the database was last opened. 
  500.  "Match".
  501. 3. Double click on the Match Field.
  502. 4. Select the FirstValue field and also check the Create Field Label box.
  503. 5. Move the new FirstValue label into the Header where the Match field label was.
  504. 6. Add the Qty field to the layout, beside the DupCheck field, then move the field label.
  505. 7. Return to Browse mode.
  506. 8. Choose Find All from the Select menu.
  507. 9. Sort the by the Match field.
  508. Only the first record of each series of values in the Match field will show the Match field value.
  509. tch         DupCheck         Qty
  510. A123              1             1
  511.                   0             2
  512.                   0             3
  513.                   0            10
  514. B456              1             9
  515.                   0             8
  516.                   0             7
  517. C789              1             6
  518.                   0             5
  519.                   0             4
  520. D159              1             5
  521. Example Five:
  522. Show summary data similar to that generated via a sub-summary report.
  523. This method assumes that your database has four fields:  DateStart (Date), DateEnd (Date), TimeStart (Time) and TimeEnd (Time).  You need to enter the data into all four fields.  Use this method if your elapsed times might be longer than 24 hours.
  524.  ((DateEnd - DateStart) * 86400) + TimeEnd - TimeStart
  525. To display the time as hours:minutes:seconds, set the calculation to result in a Time result.  To display the time as number of seconds, set the calculation to result in a Number result.
  526. ulating a Person's Age
  527. Calculation
  528. o indicate where you should type a space.)
  529.  Set up the Send Mail script step to use a 
  530. the address area of your email message.
  531.  Assuming you have first name, last name, and email address in separate fields, create a text calculation field to combine the information. One formula that works is:
  532. Email To (calculation, text) =
  533.  "(" & First Name & "^" & Last Name & ")" &" " & Email Address
  534. Note: For clarity, a caret (^) has been used to indicate where you should type a space.
  535.  Set up the Send Mail script step to use a field value for the 
  536.  field, and specify the
  537. Email To cC
  538. alculation field.
  539.  A field yielding any of the following formats will work:
  540.  (Sally Jones) sally_jones@host.com
  541.  sally_jones@host.com (Sally Jones)
  542.  Sally Jones <sally_jones@host.com>
  543.  "Sally Jones" <sally_jones@host.com>
  544. e where yo
  545. space.
  546. Mail script step to use a fi
  547. ScriptsG.Conditional Find Script using Status Functions
  548. Calculation
  549. The following calculation field definitions can extract any ordinary combination of title, first name or initial, middle name or initial, last name and suffix (e.g., Jr.) from a single name field. The formulas can correctly separate out names without a title, middle name or initial, and/ or suffix. 
  550. These calculations assume that you have the following field defined:
  551. FullName (text) [this is the original field containing the entire name]
  552. Title (Calculation, text result)=
  553. If(LeftWords(Ful
  554. Balance Due (calculation, text) = 
  555. "Your Current Balance is: $" & Int (Round (Numberfield,2)) & "." & Right (Round (Numberfield,2) * 100,2)
  556. Favorites
  557. NumberG/Formatting Numbers in a Text Calculation Field 
  558. Script
  559. To display page total information on each page of a printed document using a script, follow these steps:
  560. 1. In Define Fields, create a global field titled Total Pages with type set to number.
  561. 2. In Layout mode place the Total Pages in the header or footer. If you wish to display 
  562. page 1 of 10,
  563.  create a text block with the text 
  564. page ## of
  565.  and place it to the left of Total Pages on the layout. ( The ## will display as the current page number when in Preview or printed.)
  566. 3. Create a scria scri
  567. singleJ
  568. startD
  569. statementsA
  570. relationsh
  571. singleJ
  572. startD
  573. statementsA
  574. elds in the formula have data (are not blank).  To make a calculation field result in a blank instead of a zero, use the TextToNum, TextToDate or TextToTime function in a formula.  Use TextToNum in a calculation field with a number result.  Use TextToDate in a calculation field with a date result.  Use TextToTime in a calculation field with a time result.  Put this function inside an IF statement.  Here are sB
  575. ome sample formulas.  It should be noted that a number field or calculation with a result being a number,  may be formatted to be blank if the value to be displayed is zero.
  576.  descriptive of it
  577. s function. In the case of the above example, name the relationship, 
  578. Location Location
  579. 7.  In the same dialo
  580.  = If(DupCheck = 1, Match, "")
  581. This calculation shows a result only if the record is the first instance of each Match field value.
  582. MatchingRecords (Calculation, Number result)= Count(MyFileMatch::TextField)
  583. This calculation shows the total number of records having each value in the Match field.
  584. QtySum ((Calculation,Number result)) = Sum(MyFileMatch::Qty)
  585. This calculation gives the sum of the quantities of all records matching each Match value.
  586. QtyAvg (Calculation, Number result) = Avera
  587. ge(MyFileMatch::Qty)
  588. QtyMidPoint (Calculation, Number result) = 
  589. (Max(MyFileMatch::Qty)-Min(MyFileMatch::Qty))/2 + Min(MyFileMatch::Qty)
  590. These are just a few of the possibilities; any calculation that would work for an ordinary relationship should work in the self-join operation.
  591. 4. Create the following sample records
  592. Record     Match       Qty     TextField
  593. 1          A123         1        ZZZ
  594. 2          A123         2        YYY
  595. 3          A123         3        XXX
  596. 4          B456   
  597. CategoryB
  598. ContentB
  599. NotesB
  600. CalculationB
  601. SubjectB
  602. TitleB
  603. Search
  604. TechInfoB
  605. InformationB
  606. Total PagesB
  607. A    Client IDB
  608. MarkB
  609. Duplicate Check GlobalB
  610. Date Field
  611. Sum for A123 has changed to 10 and the new record is at the end of the database.
  612. Example Two:
  613. Show in a portal all records that are related to the current record .
  614. 1. Create a new blank layout called Show Instances. Place the Match field on it.
  615. 2. Add a portal using the MyFileMatch relationship, showing 5 portal rows.
  616. 3. Place the following fields in the first line of the portal:
  617. ::Match
  618. ::Qty
  619. ::TextField
  620. 4. Return to Browse mode.
  621. The portal should display this information for the first
  622.  record:
  623. Match          Qty             TextField       
  624. A123            1                  ZZZ                 
  625. A123            2                  YYY                
  626. A123            3                  XXX
  627. A123            4                  AAA        
  628. The portal shows all of the records in the database that have this same match field value. Note that the current record also shows in the portal. Flip to another record and observe the related records in the portal.
  629. Example Three:
  630. Identi
  631. astructure:
  632. 1. Create a file called MyFile.fp3 with the following fields:
  633. Match (Text)
  634. SerialNumber (Number, Auto enter serial number)
  635. Qty (Number)
  636. TextField (Text)
  637. 2. Still in MyFile.fp3, create a self-join relationship:
  638. Create a new relationship and choose MyFile.fp3 (i.e., the same file you are working in) as the related file. Name the relationship MyFileMatch, and select Match as the match field for both sides of the relationship. Allow creation of related records, but not deletion. 
  639. (If deletion of related records is allowed in a self-join relationship, deleting one record will delete all records in the database that share the same match field value).
  640. 3. Define the following calculation fields referencing related fields from the self-join relationship:
  641. DupCheck (Calculation, Number result) = If(MyFileMatch::SerialNumber = SerialNumber, 1, 0)
  642. This calculation flags the first record in the database that has each Match field value.
  643. FirstValue (Calculation, Text result)
  644. Note: This article assumes you know how to create relationships and define calculations that include related fields. For more instruction on these, see the User
  645. s Guide and the onscreen help.
  646. How to use it:
  647. Some of the things a self-join relationship can be used for:
  648. --Getting statistical information about a particular item; for example a count or total of all records in the database having each value in a field. (Example One)
  649. --Listing in a portal all records that have the same Match fi
  650. eld value as the current record. (Example Two)
  651. --Identifying the first record having each match field value; identifying duplicate records. (Example Three)
  652. --Displaying the Match field value only once for each group of records having that value. (Example Four)
  653. --Showing sub-summary data without a summary field or sub-summary layout. (Example Five)
  654. There are, of course, many other possibilities.
  655. Setting up the example file:
  656. To illustrate these examples, we will first need to build the infr
  657. parametersH
  658. partA
  659. particularU
  660. pasteK
  661. pathsI
  662. pauseI
  663. performA
  664. performedQ
  665. performingL
  666. performsQ
  667. periodicallyQ
  668. person'sE
  669. phoneL
  670. phraseA
  671. phrasedA
  672. phrasingA
  673. placeP
  674. placedQ
  675. placesL
  676. plugA
  677. pluggingA
  678. pointA
  679. portalU
  680. positionD
  681. possibilitiesU
  682. possibleA
  683. potentialA
  684. precedingA
  685. previewP
  686. previousA
  687. printP
  688. printedP
  689. probablyA
  690. problemN
  691. processA
  692. processedA
  693. processesA
  694. processorQ
  695. progressesQ
  696. putsL
  697. puttingD
  698. qtyavgU
  699. qtymidpointU
  700. qtysumU
  701. quantitiesU
  702. questionA
  703. questionsA
  704. rangeK
  705. reachesL
  706. readA
  707. real-worldA
  708. recipientR
  709.  relationship:
  710. DupCheck (Calculation, Number result) = If(MyFileMatch::SerialNumber = SerialNumber, 1, 0)
  711. This calculation flags the first record in the database that has each Match field value.
  712. FirstValue (Calculation, Text result)
  713. anotherA
  714. answerA
  715. answersA
  716. appearL
  717. applyA
  718. applyingA
  719. appreciateA
  720. appropriateA
  721. areaR
  722. aroundN
  723. articleU
  724. ascendingL
  725. askedA
  726. assemblingA
  727. assumeG
  728. assumesD
  729. assumingR
  730. backupL
  731. balanceN
  732. basedA
  733. becauseA
  734. becomesA
  735. beforeA
  736. beginningD
  737. beingB
  738. belowA
  739. bestA
  740. betweenA
  741. birthdateE
  742. birthdayL
  743. blankB
  744. blockP
  745. bothA
  746. bringQ
  747. bringsD
  748. brokenA
  749. browseL
  750. buildN
  751. buildingA
  752. building
  753. calculations
  754. nested
  755. statementsA
  756. calculateQ
  757. calculatedD
  758. calculatesA
  759. calculationA
  760. calculationsA
  761. calledE
  762. cannotN
  763. captureI
  764. caseA
  765. casesQ
  766. categoriesA
  767. cautionL
  768. changeD
  769. . Duplicate the layout from Example Three 
  770. 2. Add the QtySum field to the layout.
  771. 3. Perform a Find for a 1 in the DupCheck field; this will net a found set having only a single instance of each Match field value.
  772. 4. Note that the QtySum field still gives the total of all the records with each value in the Match field. 
  773. This is the same result as a report that uses a summary field to total the Qty field and a Sub-summary when sorted by Match part in the layout. The advantages of this methQ
  774. od are: it shows the results in Browse mode, and there is no need to perform a sort so it is faster to generate than a sub-summary report.
  775.  elf-joinin
  776. TipGDThe Self-Join Relationship: What It Is And Examples Of How To Use It
  777. Calculation
  778. ulation
  779. ssibilities.
  780. Setting up the example file:
  781. To illustrate these examples, we will first need to build the infr
  782.  Calculations With Nested IF Statements
  783. When creating calculations using nested IF statements, it is important to recognize that no matter how complex they look, they can always be broken down into single IF statements.
  784. The syntax for an IF statement in FileMaker Pro is:
  785.      If (test, result one, result two)
  786. It might be easier to think of an IF statement as a yes/no question that determines the next action taken:
  787.      If (question, do this if the answer
  788.  is yes, do this if the answer is no)
  789. The trick is to phrase the test so there is only a true or false (yes or no) answer possible, for example:
  790.      If (2+3=5, "true", "false")
  791. FileMaker first calculates "2+3=5", then processes the appropriate result, which is to display "true." Another example of test phrasing would be to guess a number from 1 to 1,000,000. If the test were phrased "number = 500,000" and the answer was no, up to 999,999 more IF statements may be required to guess the 
  792. TitleG
  793. Show FAQs for:R
  794. FAQS.Frequently Requested  Calculations and Scripts
  795. Search
  796. Information
  797. Overview
  798. ames.
  799. FileMaker Pro uses the ampersand (&) to concatenate fields and/or text. Notice in the examples below that text (as opposed to numbers, field names, dates or functions, etc.) are surrounded by quofield names, dates or functions, etc.) are surrounded by quo
  800. Go to Layout[The layout you want to print]
  801. Enter Preview Mode [ ]
  802. Go to Record / Request / Page [Last]
  803. Set Field ["Total Pages", "Status (CurrentPage    Number)"]
  804. If you wish to print, add these print steps:
  805. Print [No Dialog]
  806. Set Field ["Total Pages", ""]
  807. If you wish to Browse, add this print step:
  808. Enter Browse Mode []
  809. About the Calculations and Scripts.fp5 database
  810. This database is provided to help you get results quickly with FileMaker Pro. 
  811. Description
  812. This database contains calculation formulas, scripts, and tips.
  813. How to use this template
  814. Clicking on the Overview button gives you access to instructions, formulas, or script names; and, in some cases, notes.
  815. The Instructions tab explains what you need to do to create a calculation or a script.
  816. The Calculation or Script tab will show:
  817. If the record is
  818. scribing a calculation, formula(s) will be displayed without instruction so that you can bypass the instructions and just copy the formula for use in your database.
  819. If the record is describing a script, the script steps will be displayed without instruction so that you can examine them.
  820. There are 6 scripts included with this database that you can import and modify for use with your database. Follow the directions for using these scripts (create any necessary fields, etc.), open your dat
  821.  each record
  822. This field could be a customer identification number, a phone number, etc. Any field that uniquely identifies a record is acceptable. This example will use a field titled Client ID.
  823. TIP: If your database doesn't have a unique identification field, define a calculation field to create one from existing fields. For example, combine first name, last name, and birthday create a unique identification for each client.
  824. Example step 2: Add two fields
  825. * A text field, called Mark. Whe
  826. n the script finds a duplicate record, it places an x in this field to mark the record.
  827. * A global field, called Duplicate Check Global, to store the unique identification while comparing records. Duplicate Check Global should be the same data type as the Client ID field. For this example it is a number field.
  828. Example step 3: Display the Mark field
  829. Create a layout that displays the Mark field, or add the field to an existing layout. You'll use this layout to store Find setting in the fol
  830. lowing step.
  831. Example step 4: Create settings
  832. Store Sort and Find settings for the script.
  833. Sort: In Browse mode, choose Sort from the Mode menu. If fields appear in the Sort Order list, click Clear All. Click Client ID, choose Ascending order, click Move, and then click Done.
  834. Find: Choose a layout that displays the Mark field. In Find mode, type and X into the Mark field, and then switch to Browse mode. (You don't have to perform the find request.)
  835. Example step 5: Define the script
  836. criptMaker, define the Find Duplicates script.
  837. Find All
  838. Sort [Restore, No Dialog]
  839. Go to Record/Request/Page [First]
  840. Replace [No dialog, "Mark", """"]
  841. Set Field["Duplicate Check Global","ClientID"]
  842. Go to Record/Request/Page [Exit after last, Next]
  843. If ["Duplicate Check Global = ClientID"]
  844. Set Field ["Mark", ""X""]
  845. Set Field ["Duplicate Check Global","ClientID"]
  846. End If
  847. End Loop
  848. Enter Find Mode []
  849. Set Field["Mark", ""X""]
  850. Perform Find []
  851. When you perform the Find Duplicates script:
  852.  a summary field in a script may not work reliably in all cases. If a script specifies a Copy  step for a summary field that has not already calculated, it will copy a null value. This happens because the script progresses before the summary field is given time to calculate.  
  853.   Whenever you use the Enter Find Mode command and choose to Restore Find Requests, use the Perform Find command immediately after it. Be sure to uncheck the Restore option on the Perform Find command, if any chang
  854. es to the find requests in the Enter Find Mode step will occur.
  855.   Most script steps execute in the current file (i.e. the file where the script is defined). For example, to copy and paste between files, you will have to write two scripts: a script in the file where you want to copy and a script in the file where you wish to paste. In the script with the Copy command, include a Perform Script command that performs an external script, which uses the Paste command in the other database. You
  856. fy the first record having each value in the Match field; identify duplicate records. 
  857. 1. Create a new Columnar Report layout and place the Match, DupCheck, and Text fields on it. 
  858. 2. Enter Browse mode. The report should look like this:
  859. Match       DupCheck  Text
  860. A123            1            ZZZ
  861. A123            0            YYY
  862. A123            0            XXX
  863. B456            1            WWW
  864. B456            0            TTT
  865. B456            0            SSS
  866. C789            1            R
  867. C789            0            QQQ
  868. C789            0            PPP
  869. D159            1            NNN
  870. A123            0            AAA
  871. The first instance of each value in the Match field will have a one (1) in the DupCheck field. Each duplicate match-field value will have a zero (0) in the DupCheck Field. 
  872. Example Four:
  873. Show the field value only once for a group of records with the same value in the Match field.
  874. 1. Duplicate the layout created in Example Three.
  875. 2. Delete the field label
  876. Search Subject
  877. ion, text result)=
  878. Case(IsEmpty(Title) = 1 and MiddleWords(FullName, 2, 1) <> Last Name, MiddleWords(FullName, 2, 1), 
  879. IsEmpty(Title) = 0 and MiddleWords(FullName, 3, 1) <> Last Name, MiddleWords(FullName, 3, 1), "")
  880. Your computer will probably require some time to perform these calculations. 
  881. [NOTE: for clarity, field names are listed first, followed by their field type in parentheses with formulas and options after the = sign]
  882. = "Esq"or
  883. RightWords(FullName, 1) = "Sr", RightWords(FullName, 1) & ".", ""))
  884. LastName (Calculation, text result)=
  885. If(IsEmpty(Suffix)=1, RightWords(FullName, 1), LeftWords(RightWords(FullName, 2), 1))
  886. MiddleName (Calculation, text result)=
  887. Case(IsEmpty(Title) = 1 and MiddleWords(FullName, 2, 1) <> lastname, Mi
  888. C}ddleWords(FullName, 2, 1), 
  889. IsEmpty(Title) = 0 and MiddleWords(FullName, 3, 1) <> lastname, MiddleWords(FullName, 3, 1), "")
  890. Text FunctionGJExtracting Title, First, Middle, Last Name, and Suffix from a Single Field
  891. If(RightWords(FullName, 1) = "II" or RightWords(FullName, 1) = "III" or 
  892. RightWords(FullName, 1) = "IV" or RightWords(FullName, 1
  893. ) = "V" or 
  894. RightWords(FullName, 1) = "Sr" or RightWords(FullName, 1) = "MD" or RightWords(FullName, 1) = "DDS" , RightWords(FullName, 1), 
  895. If(RightWords(FullName, 1) = "Jr" or RightWords(FullName, 1) = "Esq"or
  896. RightWords(FullName, 1) = "Sr" or RightWords(FullName, 1) = "MD" or RightWords(FullName, 1) = "DDS", RightWords(FullName, 1) & ".", ""))
  897. Last Name (Calculation, text result)=
  898. If(IsEmpty(Suffix)=1, RightWords(FullName, 1), LeftWords(RightWords(FullName, 2), 1))
  899. MiddleName (Calculat
  900. Open ScriptMaker
  901. .Conditional Find Script using Status Functions
  902. Finding a Range of Dates
  903. Finding Duplicate Records
  904. 0Including the Recipient Name in an Email Message
  905. )Printing Total Page Numbers with a Script
  906. Search by Category
  907. Sort by Category
  908. Sort by Subject
  909. Sort by Title
  910. Go to Information Layout
  911. Go to List Layout
  912.  !Go to Overview Calculation Layout
  913. ""Go to Overview Instructions Layout
  914. Go to Overview Notes Layout
  915. Go to Search Layout
  916. Import New FAQs
  917. Sort by Category
  918. VDEFA(
  919. CategoryB
  920. Subject
  921. SORTA
  922. /Request/Page [First]
  923. Replace [No dialog, "Mark", """"]
  924. Set Field["Duplicate Check Global","ClientID"]
  925. Go to Record/Request/Page [Exit after last, Next]
  926. If ["Duplicate Check Global = ClientID"]
  927. Set Field ["Mark", ""X""]
  928. Set Field ["Duplicate Check Global","ClientID"]
  929. End If
  930. End Loop
  931. Enter Find Mode []
  932. Set Field["Mark", ""X""]
  933. Perform Find []
  934. When you perform the Find Duplicates script:
  935. It finds all records, and then sorts them by the ClientID field so that records with the same Client ID are grouped together.
  936. 2. Starting with the first record, the script copies the value from the ClientID field into the Duplicate Check Global field.
  937. 3. The script goes to the next record and compares the value in ClientID with the value in Duplicate Check Global.
  938. * If the values match, the record is a duplicate, the script puts an X in the Mark field .
  939. * If the values don't match, Fil
  940. Script
  941. Finding a Range of Dates Using ScriptMaker
  942. To find a range of dates in a script:
  943. 1- Use the Paste Result step (vs. the Set Field or Paste steps)
  944. 2- Use the DatetoText function inside the Paste Result step to convert each date to text format
  945. Your script would look like this:
  946. Enter Find Mode []
  947. Paste Result [
  948. Date Field
  949. DateToText(Today-14) & 
  950.  & DateToText(Today)
  951. Perform Find []
  952. s another example using global date fields:
  953. Enter Find Mode []
  954. Paste Result [
  955. Date Field
  956. DaBKteToText(GlobalField1) & 
  957.  & DateToText(GlobalField2)
  958. Perform Find []
  959.  would look like this:
  960. Enter Find Mode []
  961. Paste Result [
  962. Date Field
  963. DateToText(Today-14) & 
  964.  & DateToText(Today)
  965. Perform Find []
  966. s another example using global date fields:
  967. Enter Find Mode []
  968. Paste Result [
  969. Date Field
  970. DaBKteToText(GlobalField1) & 
  971.  & DateToText(GlobalField2)
  972. Perform Find []
  973. Deleting the duplicate records
  974. To delete the duplicate records you can manually delete the found set using the Delete All command from the Mode menu after running the Find Duplicates script. This way you can control the deleting of records before making any mistakes. If your script works properly to find the duplicate records you can add the Delete All command as the last step to your script. This will automate the entire process for you.
  975. CAUTION: Deleting records is NOT undoable. Use ofB
  976.  this script to delete duplicate records should be run on a copy of your database file. Always create a backup of your database before performing any scripts that include steps for deletion of records.
  977. Import the script "Finding Duplicate Records", and modify it for use with your database.E
  978. LogicalG
  979. Finding Duplicate Records
  980. ind setting in the fol
  981. Calculation
  982. mula provides an accurate calculation of the work days between any two work dates. It assumes that StartDate is earlier than (or the same as) EndDate. If you want Monday through Tuesday to return 2 work days (instead of 1), add one (+1) to the end of the calculation formula.
  983. Note Pad
  984. WorkDays (calculation, number result) =
  985.  Int((EndDate - StartDate)/7) * 5 + Mod (EndDate -StartDate,7) - If(DayofWeek(EndDate) < DayofWeek(StartDate),2,0)
  986. Graphing C
  987. DateG8Calculating Number of Weekdays (Work Days) Between Dates
  988. Calculation
  989. Graphing C
  990. xample Three.
  991. 2. Delete the field label 
  992. TimeG;Calculating Elapsed Time When Ending Time is on a Later Day
  993.  from another, FileMaker calculates the difference as the number of seconds.  Therefore, it's easiest to calculate time based on seconds, rather than as hours, minutes and seconds.  The 86400 equals the number of seconds in a day.  When you set the calculation field to result in time, FileMaker converts the number (of seconds) to time (hours:minutes:seconds).
  994. ElapsedTime (calculation, time) =
  995.  ((DateEnd - DateStart) * 86400) + TimeEnd - TimeStart
  996. To display the time as hours:minutes:seconds, set the calculation to result in a Time result.  Optionally, use the Time Format command to change the display format.  To display the time as number of seconds, set the calculation to result in a Number result.
  997. n to your ListView layout. Note that the Qty
  998. eting the duplicate records
  999. To delete the duplicate records you can manually delete the found set using the Delete All command from the Mode menu after running the Find Duplicates script. This way you can control the deleting of records before making any mistakes. If your script works properly to find the duplicate records you can add the Delete All command as the last step to your script. This will automate the entire process for you.
  1000. CAUTION: Deleting records is NOT undoable. Use ofB
  1001.  this script to delete duplicate records should be run on a copy of your database file. Always create a backup of your database before performing any scripts that include steps for deletion of records.
  1002. nswer is no)
  1003. The trick is to phrase the test so there is only a true or false (yes or no) answer possible, for example:
  1004.      If (2+3=5, "true", "false")
  1005. FileMaker first calculates "2+3=5", then processes the appropriate result, which is to display "true." Another example of test phrasing would be to guess a number from 1 to 1,000,000. If the test were phrased "number = 500,000" and the answer was no, up to 999,999 more IF statements may be required to guess the correct number. However, i
  1006. f the test were phrased "number > 500,000", the answer may still be no, but no more than 20 tests would be required to find the correct number. The point is, optimally phrasing the test part of an IF statement makes a big difference in how many subsequent nests are needed.
  1007. The simplest way to describe a nested IF statement is to think of an IF statement inside of an IF statement, or to use the analogy above, a series of yes/no questions designed to lead to a desired result.
  1008. In a nested I
  1009. First NameB
  1010. A    Last NameB
  1011. Email AddressB
  1012. Email ToB
  1013. A* "(" & 
  1014.  & " " & 
  1015.  & ")" &" " & 
  1016. ds(FullName, 1) = "Jr" or RightWords(FullName, 1) = "II" or RightWords(FullName, 1) = "III" or RightWords(FullName, 1) = "IV" or RightWords(FullName, 1) = "
  1017. or RightWords(FullName, 1) = "Esq"or RightWords(FullName, 1) = "MD" or RightWords(FullName, 1) = "Sr" or RightWords(FullName, 1) = "PhD", RightWords(FullName, 1), "")
  1018. LastName (Calculation, text result)=
  1019. If(IsEmpty(Suffix)=1, RightWords(FullName, 1), LeftWords(RightWords(FullName, 2), 1))
  1020. MiddleName (Calculation, text result)=
  1021. Case(IsEmpty(Title) = 1 and MiddleWords(FullName, 2, 1) <> lastname, MiddleWords(FullName, 2, 1), 
  1022. IsEmpty(Title) = 0 and MiddleWords(FullName, 3, 1) <> lastnam
  1023. threeD
  1024. throughA
  1025. thursdayD
  1026. timeA
  1027. timeendF
  1028. timesF
  1029. timestartF
  1030. titleJ
  1031. titledL
  1032. display
  1033. total
  1034. information
  1035. printed
  1036. range
  1037. dates
  1038. scriptK
  1039. calculation
  1040. create
  1041. fieldsM
  1042. todayA
  1043. today-14K
  1044. togetherL
  1045. toggleQ
  1046. totalP
  1047. towardA
  1048. trickA
  1049. trueA
  1050. tuesdayD
  1051. typeL
  1052. typesQ
  1053. uncheckQ
  1054. understandL
  1055. understandingA
  1056. undoableL
  1057. uniqueL
  1058. uniquelyL
  1059. unlikeW
  1060. therH
  1061. whichA
  1062. willB
  1063. withA
  1064. withoutJ
  1065. workD
  1066. workdaysD
  1067. workdays/5D
  1068. workingD
  1069. wouldA
  1070. yearE
  1071. yearsE
  1072. yes/noA
  1073. obtain
  1074. calculation
  1075. results
  1076. whether
  1077. yourA
  1078. zeroB
  1079. paste
  1080. result
  1081. field
  1082. paste
  1083. stepsK
  1084. 1000000A
  1085. 1002N
  1086. 12345012340123601256D
  1087. 1904D
  1088. 1999M
  1089. 500000A
  1090. 86400F
  1091. 99999Q
  1092. 999999A
  1093. calculation
  1094. field
  1095. always
  1096. result
  1097. number
  1098. a123U
  1099. aboutU
  1100. aboveA
  1101. acceptableL
  1102. accessQ
  1103. accidentallyD
  1104. accomplishedD
  1105. foreA
  1106. beingB
  1107. belowA
  1108. bestA
  1109. betweenA
  1110. blankB
  1111. bothA
  1112. bringsD
  1113. brokenA
  1114. buildingA
  1115. building
  1116. calculations
  1117. nested
  1118. statementsA
  1119. calculatedD
  1120. calculatesA
  1121. calculationA
  1122. calculationsA
  1123. caseA
  1124. categoriesA
  1125. changeD
  1126. chartA
  1127. functionJ
  1128. logical
  1129. number
  1130. scripts
  1131. textJ
  1132. functionJ
  1133. betweenG
  1134. blankB
  1135. buildingA
  1136. building
  1137. calculations
  1138. nested
  1139. statementsA
  1140. calculatingB
  1141. calculating
  1142. blank
  1143. instead
  1144. calculating
  1145. finish
  1146. start
  1147. number
  1148. calculating
  1149. person's
  1150. calculating
  1151. elapsed
  1152. ending
  1153. later
  1154. Mep #2 above)
  1155.      Mod (WorkDays, 5)
  1156. Now to obtain the correct value, add one to all of this to grab the appropriate value.  For example, if StartDate is a Sunday (returns zero from first Mod() function), and excess days is zero, it leaves us at the beginning of the string.  Therefore, add one to get us to the first position.
  1157.         1            RR
  1158. recognizeA
  1159. recordI
  1160. record/request/pageL
  1161. emberA
  1162. repeatH
  1163. replacedA
  1164. replacesD
  1165. requestL
  1166. requiredA
  1167. requiresH
  1168. restoreL
  1169. resultA
  1170. result
  1171. result
  1172. resultsA
  1173. returnD
  1174. returnedD
  1175. returnsD
  1176. rightwordsJ
  1177. sameG
  1178. sampleB
  1179. satisfactoryH
  1180. saturdayD
  1181. saysA
  1182. scoreH
  1183. scriptI
  1184. scriptmakerK
  1185. scriptsL
  1186. secondsF
  1187. sectionsL
  1188. separateJ
  1189. seriesA
  1190. settingL
  1191. settingsL
  1192. sevenD
  1193. shouldB
  1194. showI
  1195. simplestA
  1196. sinceA
  1197. singleA
  1198. single
  1199. record
  1200. viewI
  1201. situationA
  1202. someB
  1203. somehowD
  1204. sortL
  1205. startdateD
  1206. startingA
  1207. statementA
  1208. statementsA
  1209. statusI
  1210. stepD
  1211. stepsK
  1212. stillA
  1213. storeL
  1214. stringD
  1215. subsequentA
  1216. substituteA
  1217. subtractD
  1218. suffixJ
  1219. sundayD
  1220. switchL
  1221. syntaxA
  1222. systemD
  1223. tableD
  1224. takeG
  1225. takenA
  1226. takesD
  1227. zeroB
  1228. accordinglyA
  1229. achieveA
  1230. achievedA
  1231. acrossD
  1232. actionA
  1233. actualD
  1234. addedD
  1235. addressR
  1236. advantagesU
  1237. afterA
  1238. agingA
  1239. alertQ
  1240. allowQ
  1241. allowedU
  1242. allowsR
  1243. alongR
  1244. alreadyA
  1245. alsoA
  1246. alternateW
  1247. alternativeW
  1248. alwaysA
  1249. analogyA
  1250. umesD
  1251. backA
  1252. basedA
  1253. becauseA
  1254. becomesA
  1255. beforeA
  1256. beginningD
  1257. beingB
  1258. belowA
  1259. bestA
  1260. betweenA
  1261. birthdateE
  1262. blankB
  1263. bothA
  1264. bringsD
  1265. brokenA
  1266. buildingA
  1267. building
  1268. calculations
  1269. nested
  1270. statementsA
  1271. calculatedD
  1272. calculatesA
  1273. calculationA
  1274. calculationsA
  1275. calledE
  1276. captureI
  1277. caseA
  1278. categoriesA
  1279. changeD
  1280. chartA
  1281. checkH
  1282. Zpt that has these steps:
  1283. Go to Layout[The layout you want to print]
  1284. Enter Preview Mode [ ]
  1285. Go to Record / Request / Page [Last]
  1286. Set Field ["Total Pages", "Status (CurrentPageNumber)"]
  1287. If you wish to print, add these print steps:
  1288. Print [No Dialog]
  1289. Set Field ["Total Pages", ""]
  1290. If you wish to Browse, add this print step:
  1291. Enter Browse Mode []
  1292. Import the script "Printing Total Page Numbers with a Script", and modify it for use with your database.
  1293. DragThing
  1294. ScriptsG)Printing Total Page Numbers with a Script
  1295. Script
  1296. e, add this print step:
  1297. Enter Browse Mode []
  1298. Import the script "Printing Total Page Numbers with a Script", and modify it for use with your database.
  1299. Scriptspts
  1300. eld emp
  1301. You can obtain the same calculation results whether you use the If statement or the Case statement, but as you can see from the following example the Case statement requires fewer parameters for the same equation. 
  1302. If(Score > 90,  "Excellent", If(Score > 80, "Very Good", If(Score > 50, "Satisfactory", "Needs Improvement")))
  1303. Case(Score > 90, "Excellent", Score > 80, "Very Good", Score > 50, "Satisfactory", "Needs Improvement") 
  1304. Either calculation displays Excellent when the score is abo
  1305. 9ve 90, Very Good when the score is above 80 Satisfactory when the score is above 50, and Needs Improvement for any other score, but use of the If statement requires you to repeat IF( for each test you want to check and it also requires that a ) for each test in the equation be entered at the end of the equation.
  1306. TipG(Comparison of the IF and Case Statements
  1307. en the answer to the preceding IF statement is false). The preceding formula now becomes:
  1308.      If (Today - Invoice Date <= 30, "30 days or less",If (Today - Invoice Date<= 60, "31 - 60 days", result two))
  1309. Now the calculation says: IF the difference between Today and the Invoice Date is less than or equal to 30, perform result one, which is to display "30 days or less," or else perform result two...which is another IF statement. If the difference between Today and the Invoice Date is less
  1310.  than or equal to 60, then perform result one, which is to display "31 - 60 days," or else perform result two.
  1311. By now this is probably starting to feel more comfortable. To find out if the difference between Today and the Invoice Date is less than or equal to 90 and
  1312. if so
  1313. to display "61 - 90 days," we would add to the formula accordingly:
  1314.      If (Today - Invoice Date <= 30, "30 days or less",If (Today - Invoice Date <= 60, "31 - 60 days",If (Today - Invoice Date <= 90, "61 - 90 days", r
  1315. lName, 1) = "mr" 
  1316. or LeftWords(FullName, 1) = "mrs" 
  1317. or LeftWords(FullName, 1) = "ms" 
  1318. or LeftWords(FullName, 1) = "dr",
  1319. LeftWords(FullName, 1)  & ".", 
  1320. If(LeftWords(FullName, 1) = "miss", LeftWords(FullName, 1), ""))
  1321. First Name (Calculation, text result)=
  1322. If(IsEmpty(Title), LeftWords(FullName, 1), MiddleWords(FullName,2, 1))
  1323. Suffix (Calculation, text result)=
  1324. If(RightWords(FullName, 1) = "II" or RightWords(FullName, 1) = "III" or 
  1325. RightWords(FullName, 1) = "IV" or RightWords(FullName, 1
  1326. ) = "V" or 
  1327. RightWords(FullName, 1) = "Sr" or RightWords(FullName, 1) = "MD" or RightWords(FullName, 1) = "DDS" , RightWords(FullName, 1), 
  1328. If(RightWords(FullName, 1) = "Jr" or RightWords(FullName, 1) = "Esq"or
  1329. RightWords(FullName, 1) = "Sr" or RightWords(FullName, 1) = "MD" or RightWords(FullName, 1) = "DDS", RightWords(FullName, 1) & ".", ""))
  1330. Last Name (Calculation, text result)=
  1331. If(IsEmpty(Suffix)=1, RightWords(FullName, 1), LeftWords(RightWords(FullName, 2), 1))
  1332. MiddleName (Calculat
  1333. \\ZED\DoubleDuty
  1334. Your computer will probably require some time to perform these calculations. 
  1335. [NOTE: for clarity, field names are listed first, followed by their field type in parentheses with formulas and options after the = sign]
  1336. feelA
  1337. fewerH
  1338. fieldA
  1339. fieldsA
  1340. fileL
  1341. filemakerA
  1342. filesQ
  1343. finalA
  1344. findA
  1345. findingK
  1346. finding
  1347. range
  1348. dates
  1349. using
  1350. scriptmakerK
  1351. findsL
  1352. firstA
  1353. firstvalueU
  1354. fiveD
  1355. fixedN
  1356. flagsU
  1357. flipU
  1358. followP
  1359. formulasB
  1360. foundI
  1361. fourA
  1362. fridayD
  1363. fromA
  1364. fullE
  1365. fullageE
  1366. fullnameJ
  1367. functionB
  1368. futureM
  1369. givenD
  1370. given
  1371. starting
  1372. number
  1373. working
  1374. endingD
  1375. globalK
  1376. globalfield1K
  1377. globalfield2K
  1378. goesL
  1379. goodH
  1380. greatA
  1381. greaterA
  1382. groupA
  1383. groupedL
  1384. groupingD
  1385. guessA
  1386. happensA
  1387. haveA
  1388. helpD
  1389. hereB
  1390. here'sD
  1391. here's
  1392. logicD
  1393. higherA
  1394. hoursF
  1395. howeverA
  1396. identificationL
  1397. identifiesL
  1398. identifyL
  1399. wwwwww
  1400. wwwwww
  1401. Instructionsf
  1402. Instructionsp
  1403. Notesq
  1404. FAQw.Frequently Requested  Calculations and Scripts
  1405. wwwwww
  1406. wwwwww
  1407. Search
  1408. Information
  1409. Overview
  1410. >, <<
  1411. ABAF>>
  1412. Overview - NotesB
  1413. SearchB
  1414. SearchB
  1415.       9        WWW
  1416. 5          B456         8        TTT
  1417. 6          B456         7        SSS
  1418. 7          C789         6        RRR
  1419. 8          C789         5        QQQ
  1420. 9          C789         4        PPP
  1421. 10         D159         5        NNN
  1422. Example One:
  1423. Get statistical data for each unique value in the Match field (for example, the total, average, and midpoint quantities of all records with each Match field value).
  1424. 1. Create an Extended Columnar Report layout named ListView and place on 
  1425. it the following fields: Match, QtySum, QtyAvg, QtyMidPoint.
  1426. 2. Enter Browse mode; the report should start like this:
  1427. Match       QtySum         QtyAvg       ...etc.
  1428. A123          6                           etc.
  1429. A123          6
  1430. A123          6
  1431. B456         24
  1432. B456         24
  1433. B456         24
  1434. C789         15
  1435. C789         15
  1436. C789         15
  1437. D159          5
  1438. 3. Return to Layout #1 and add a new record with Match=A123, Qty=4, TextField=AAA.
  1439. 4. Return to your ListView layout. Note that the Qty
  1440. apply the above techniques toward a real-world situation by building a nested IF calculation to age invoices into the four categories below.
  1441.      30 days or less
  1442.      31 - 60 days
  1443.      61 - 90 days
  1444.      Over 90 days
  1445. If we looked at the invoice date the first question asked would be: "Is the age of this invoice 30 days or less?" In FileMaker Pro terms, this would be:
  1446.      If (Today - Invoice Date <= 30, "30 days or less", result two)
  1447. In English, this calculation says: "If the difference 
  1448. between Today and the Invoice Date is less than or equal to 30, then perform result one by displaying '30 days or less,' but perform result two when this is not true."
  1449. But what if Today - Invoice Date is not less than or equal to 30 days? Since we already know the age of the invoice is greater than 30 days, we could next ask if the difference between Today and the Invoice Date is less than or equal to 60. We can substitute this for the first result two (remember result two is processed wh
  1450. INFORMATION
  1451. unnecessary@
  1452. wish@
  1453. calculating
  1454. elapsed
  1455. ending
  1456. extracting@
  1457. single@
  1458. status@
  1459. INFORMATION
  1460. (LIST
  1461. LISTA
  1462. Calculation
  1463. Script
  1464. VDEFA(
  1465. (LIST
  1466. VDEFA(
  1467. CategoryB
  1468. Subject
  1469. FMRLA
  1470. SORTA
  1471. InformationB
  1472. A.Conditional Find Script using Status Functions
  1473. \\ZED\DoubleDuty
  1474. ListB
  1475. Overview - InstructionsB
  1476. techniquesA
  1477. termsA
  1478. testA
  1479. testsA
  1480. textE
  1481. textfieldU
  1482. texttodateB
  1483. texttonumB
  1484. texttotimeB
  1485. thanA
  1486. thatA
  1487. that'sA
  1488. following
  1489. calculation
  1490. field
  1491. definitions
  1492. extract
  1493. following
  1494. calculation
  1495. determine
  1496. number
  1497. following
  1498. sections
  1499. explain
  1500. database
  1501. script
  1502. allows
  1503. specify
  1504. field
  1505. valuesR
  1506. themD
  1507. thenA
  1508. thereA
  1509. there'sA
  1510. thereforeD
  1511. theseE
  1512. these
  1513. calculations
  1514. compare
  1515. value
  1516. existing
  1517. theyA
  1518. thingsU
  1519. thinkA
  1520. thisA
  1521. method
  1522. assumes
  1523. database
  1524. fields
  1525. datesF
  1526. method
  1527. assumes
  1528. database
  1529. three
  1530. fields
  1531. dateW
  1532. script
  1533. layouts
  1534. namedI
  1535. thoseD
  1536. thoughQ
  1537. ew and place on 
  1538. Instructions
  1539. wwwwww
  1540. Notesy
  1541. Notesz
  1542. FAQ{.Frequently Requested  Calculations and Scripts
  1543. wwwwww
  1544. wwwwww
  1545. wwwwww
  1546. wwwwww
  1547. wwwwww
  1548. wwwwww
  1549. Search
  1550. Information
  1551. Overview
  1552. Overview - CalculationB
  1553. Search
  1554. Information
  1555. Overview
  1556. Category
  1557. Subject
  1558. Title
  1559. p.Frequently Requested  Calculations and Scriptsq
  1560. By:r#Click arrow to see more information
  1561. Sort by Subject
  1562. Sort by Title
  1563. Search by Category
  1564. \\ZED\DoubleDuty
  1565. FAQ{.Frequently Requested  Calculations and Scripts
  1566. wwwwww
  1567. wwwwww
  1568. wwwwww
  1569. Search
  1570. Information
  1571. Overview
  1572. Instructions
  1573. wwwwww
  1574. Noteslationy
  1575. Noteslationy
  1576. Notes
  1577. wwwwww
  1578. Notesx
  1579. Notesy
  1580. Calculation
  1581. wwwwww
  1582. Notesx
  1583. Notesy
  1584. Calculationntly Requested  Calculations and Scripts
  1585. Information
  1586. wwwwww
  1587. wwwwww
  1588. wwwwww
  1589. Overview
  1590. F calculation, the test part is evaluated first. Based on the result of the test (usually a false result), the next IF statement or test is evaluated. The desired result is achieved through the process of elimination from previous IF statements in the calculation.
  1591. Let's say that result two (the result you get when the test is false) is replaced by another IF statement to be processed. In this case, result two = If (test, result one, result two). Below is what the expanded IF statement loo
  1592. ks like:
  1593.      If(test, result one, If (test, result
  1594. one, result
  1595. two))
  1596. In English, this would read: "IF the first test is true, process result one, or else process result two, which happens to be another IF statement."
  1597. For a different kind of nested IF, say that both results one and two are also IF statements. When we plug this back into our calculation, we get:
  1598.      If (test, If (test, result
  1599. one, result
  1600. two),  If (test, result one, result two))
  1601. Applying the concept to an example
  1602. Let's 
  1603. elaps
  1604. b-14) & "..." & 
  1605. A0Including the Recipient Name in an Email Message
  1606. \\ZED\DoubleDuty
  1607. e, 1) = "
  1608. Information about this databaseW
  1609. FAQX.Frequently Requested  Calculations and Scripts
  1610. Search
  1611. Information
  1612. Overview
  1613. wwwwww
  1614. Single Record ViewB
  1615. Multiple Record ViewB
  1616. calculation, one IF statement at a time. A great way to design a nested IF calculation is to try to chart it. All that's left after that is assembling the calculation by plugging the lower level calculations into the higher ones.
  1617. TipG/Building Calculations with Nested IF Statements
  1618. ments may be required to guess the correct number. However, i
  1619. f the test were phrased "number > 500,000", the answer may still be no, but no more than 20 tests would be required to find the correct number. The point is, optimally phrasing the test part of an IF statement makes a big difference in how many subsequent nests are needed.
  1620. The simplest way to describe a nested IF statement is to think of an IF statement inside of an IF statement, or to use the analogy above, a series of yes/no questions designed to lead to a desired result.
  1621. In a nested I
  1622. pageP
  1623. person'sE
  1624. printingP
  1625. printing
  1626. total
  1627. numbers
  1628. scriptP
  1629. rangeK
  1630. recipientR
  1631. recordsL
  1632. relationshipU
  1633. sameW
  1634. scriptI
  1635. scriptmakerK
  1636. scriptmaker
  1637. tipsQ
  1638. self-joinU
  1639. sendR
  1640. including
  1641. recipient
  1642. email
  1643. messageR
  1644. serializing
  1645. records
  1646. category
  1647. using
  1648. script
  1649. scriptS
  1650. nd an expiration date we can figure out exactly how many years, months and days until you should finally throw
  1651. V out that big bottle of aspirin in the back of your medicine
  1652. cabinet. 
  1653. A special note about the Today function. 
  1654. The Today function calculates every time you open your database. If your database stays open for more than a day, then the Today function may not actually give you today's date but
  1655. rather the date the database was last opened. 
  1656. e are, of course, many other possibilities.
  1657. Setting up the example file:
  1658. To illustrate these examples, we will first need to build the infr
  1659. Calculation
  1660. The following calculation will determine the number of work days between StartDate and EndDate.
  1661. These examples assume that you have the following fields:
  1662. StartDate (date)
  1663. EndDate (date)
  1664. WorkDays (calculation, number result) =
  1665.  Int((EndDate - StartDate)/7) * 5 + Mod (EndDate -StartDate,7) - If(DayofWeek(EndDate) < DayofWeek(StartDate),2,0)
  1666. Here's the logic:
  1667. 1.  Take the number of weeks between the two dates and multiply the result by five working days per week. 
  1668. 2.  Add the remaining daB
  1669. ys which do not make up a full week. 
  1670. 3.  If EndDate occurs on a day of the week before StartDate, then subtract the 2 weekend days.
  1671. TimeG;Calculating Elapsed Time When Ending Time is on a Later Day
  1672. FileMaker Pro has several powerful date functions which make it possible to determine the number of years, months and days that have elapsed between two dates. This is useful in many ways. Given a birth date and today's date, we can determine a person's age. If we know the hire date and the termination date we can calculate the employee's length of service. Based on today's date and an expiration date we can figure out exactly how many years, months and days until you should finally throw
  1673. U out that big bottle of aspirin in the back of your medicine
  1674. cabinet. 
  1675. A special note about the Today function. 
  1676. The Today function calculates every time you open your database. If your database stays open for more than a day, then the Today function may not actually give you today's date but
  1677. rather the date the database was last opened. 
  1678. ))) & " Days"
  1679. between
  1680. dates
  1681. finding
  1682. future
  1683. dates
  1684. ending
  1685. later
  1686. calculating
  1687. elapsed
  1688. ending
  1689. calculating
  1690. number
  1691. weekdays
  1692. between
  1693. dates
  1694. comparison
  1695. statements
  1696. conditional
  1697. script
  1698. using
  1699. status
  1700. functions
  1701. extracting
  1702. title
  1703. first
  1704. middle
  1705. suffix
  1706. finding
  1707. range
  1708. dates
  1709. using
  1710. scriptmaker
  1711. finding
  1712. duplicate
  1713. records
  1714. finding
  1715. future
  1716. dates
  1717. formatting
  1718. numbers
  1719. calculation
  1720. field
  1721. identifying
  1722. duplicate
  1723. records
  1724. printing
  1725. total
  1726. numbers
  1727. script
  1728. scriptmaker
  1729. including
  1730. recipient
  1731. email
  1732. message
  1733. self-join
  1734. relationship
  1735. examples
  1736. This formula provides an accurate calculation of the work days between any two work dates. It assumes that StartDate is earlier than (or the same as) EndDate. If you want Monday through Tuesday to return 2 work days (instead of 1), add one (+1) to the end of the calculation formula.
  1737. Note Pad
  1738. WorkDays (calculation, number result) =
  1739.  Int((EndDate - StartDate)/7) * 5 + Mod (EndDate -StartDate,7) - If(DayofWeek(EndDate) < DayofWeek(StartDate),2,0)
  1740. Graphing C
  1741. DateG8Calculating Number of Weekdays (Work Days) Between Dates
  1742. Note Pad
  1743. ame as) EndDate. If you want Monday through Tuesday to return 2 work 
  1744. Monday.  Using the chart, for a StartDate of Wednesday
  1745. calculating
  1746. elapsed
  1747. ending
  1748. calculating
  1749. number
  1750. weekdays
  1751. between
  1752. datesG
  1753. calculationN
  1754. calculationsA
  1755. caseH
  1756. comparisonH
  1757. comparison
  1758. statementsH
  1759. conditionalI
  1760. conditional
  1761. script
  1762. using
  1763. status
  1764. functionsI
  1765. dateD
  1766. datesG
  1767. daysD
  1768. duplicateL
  1769. elapsedF
  1770. emailR
  1771. endingF
  1772. examplesU
  1773. amplesU
  1774.           0        1      4       5      6
  1775. Friday                    0   
  1776.      3      4       5      6
  1777. To determine the day of the week for StartDate, we can use the Mod() function (with 7) and subtract a known Sunday date from StartDate (The first known Sunday date in the Macintosh system is January 3, 1904).  This results in a value from zero (Sunday) through six (Saturday).  If the result is Wednesday (value returned is 3), somehow, we want to drop down to the Wednesday row.  Then, determine the number of excess work days above a multiple of five and move ac
  1778. tationery
  1779. eEnd (Time).  You need to enter the data into all four fields.  Use this method if your elapsed times might be longer than 24 hours.
  1780.  ((DateEnd - DateStart) * 86400) + TimeEnd - TimeStart
  1781. To display the time as hours:minutes:seconds, set the calculation to result in a Time result.  To display the time as number of seconds, set the calculation to result in a Number result.
  1782. te:  When you set the calculation to result as Time and click OK, you will see an alert message.  Ignore the alert and click OK.
  1783. not actually give you today's date but
  1784. rather the date the database was last opened. 
  1785. Note:  FileMaker calculates time in seconds.  When you subtract one time from another, FileMaker calculates the difference as the number of seconds.  Therefore, it's easiest to calculate time based on seconds, rather than as hours, minutes and seconds.  The 86400 equals the number of seconds in a day.  When you set the calculation field to result in time, FileMaker converts the number (of seconds) to time (hours:minutes:seconds).
  1786. ElapsedTime (calculation, time) =
  1787.  ((DateEnd - DateStart) * 86400) + TimeEnd - TimeStart
  1788. To display the time as hours:minutes:seconds, set the calculation to result in a Time result.  Optionally, use the Time Format command to change the display format.  To display the time as number of seconds, set the calculation to result in a Number result.
  1789.    Tu   W     Th   F 
  1790. Tuesday              T
  1791. Orderdate, Orderdate + 14, TextToDate("") )
  1792. -- In this example, if either Shipdate or Orderdate are blank, the calculation results in a blank.
  1793. Time Calculation that results in a blank instead of 00:00:00  if any field in the formula is blank:
  1794. If (TimeOut > TimeIn, TimeOut, TextToTime("") )
  1795. -- In this example, if either TimeOut or TimeIn are blank, the calculation results in a blank.
  1796. TipG*Calculating a Blank instead of a Zero or ?
  1797. Calculation
  1798. her Hours Worked or Rate is blank, the calculation results in a blank. 
  1799. Date Calculation that results in a blank instead of 00/00/0000 or  "?" displayed  if any field in the formula is blank:
  1800. If (Shipdate > 
  1801. f either TimeOut or TimeIn are blank, the calculation results in a blank.
  1802. TipG*Calculating a Blank instead of a Zero or ?tle) = 0 and MiddleWords(FullName, 3, 1) <> lastnam
  1803. Go to Search Layout
  1804. Go to List Layout
  1805. A"Go to Overview Instructions Layout
  1806. A!Go to Overview Calculation Layout
  1807. Go to Overview Notes Layout
  1808. Go to Information Layout
  1809. emailto
  1810. derDate + 28 + Middle ("1065432",
  1811.  DayOfWeek (OrderDate), 1)
  1812. Calculation, Date result)  =  
  1813.      OrderDate + 42 + Middle ("5432106",
  1814.       DayOfWeek (OrderDate), 1)
  1815. The text string "5432106" is used for each day of the week.  That is, if the date falls on a Sunday, we want to add 5 additional days in order to get to the following Friday.  4 for Monday, 3 for Tuesday, etc.
  1816. The calculation above can actually return ANY weekday in the f
  1817. uture, for ANY number of weeks.
  1818. To calculate a date that is X number of weeks in the future, just calculate 7 times X (where X is the number of weeks).  In this case, 7 days times 6 weeks = 42.
  1819. If you want to know the Monday 4 weeks in the future, you would type the following:
  1820. DueDate  (Calculation, Date result)  =
  1821.      OrderDate + 28 + Middle ("1065432",
  1822.       DayOfWeek (OrderDate), 1)
  1823. The number 28 is derived from four weeks multiplied by seven days per week.  Again, the string is si
  1824. esult two)))
  1825. At this point, it's important to appreciate that each nested IF statement is designed to eliminate the potential answers until there's only one result left. Applying this to our invoice aging calculation, if the difference is not less than 30 days, and the difference is not less than or equal to 60 days, and the difference is not less than or equal to 90 days, there is only one result left...over 90 days. It's unnecessary to add another IF statement because at this point ther
  1826. e can be only one possible result. So the final calculation would be:
  1827.      If (Today - Invoice Date <= 30, "30 days or less",If (Today - Invoice Date <= 60, "31 - 60 days",If (Today - Invoice Date <= 90, "61 - 90 days", "Over 90 days")))
  1828. The concept of a calculation using nested IF statements is a great way to process results from a field or a group of fields to achieve a desired result. The best way to do this is to have a clear understanding of the desired results before building your 
  1829. G    duplicate
  1830. eld to create one from existing fields. For example, combine first name, last name, and birthday create a unique identification for each client.
  1831. Example step 2: Add two fields
  1832. * A text field, called Mark. When t
  1833.  correct grouping, first find the day of the week that StartDate occurs, and then multiply by five (since each grouping contains five values - zero through four).
  1834.      Mod (StartDate - Date (1, 3, 1904), 7) * 5
  1835. Now, find the excess days above a multiple of 5 (from logic step #2 above)
  1836.      Mod (WorkDays, 5)
  1837. Now to obtain the correct value, add one to all of this to obtain the appropriate value.  For example, if StartDate is a Sunday (returns zero from first Mod() function), and excess daHmys is zero, it leaves us at the beginning of the string.  Therefore, add one to get us to the first position.
  1838. hcked
  1839. ctual days replaces the day of the week:
  1840. Work Days           0      1       2       3       4
  1841. Sunday                1
  1842. Calculation
  1843. A calculation field will always result in a number, date or time if any of the fields in the formula have data (are not blank).  To make a calculation field result in a blank instead of a zero, use the TextToNum, TextToDate or TextToTime function in a formula.  Use TextToNum in a calculation field with a number result.  Use TextToDate in a calculation field with a date result.  Use TextToTime in a calculation field with a time result.  Put this function inside an IF statement.  Here are sr, date or time if any of the fields in the formula have data (are not blank).  To make a calculation field result in a blank instead of a zero, use the TextToNum, TextToDate or TextToTime function in a formula.  Use TextToNum in a calculation field with a number result.  Use TextToDate in a calculation field with a date result.  Use TextToTime in a calculation field with a time result.  Put this function inside an IF statement.  Here are s
  1844. ead to a desired result.
  1845. In a nested I
  1846.   When you use the Perform Script command, there are two types of scripts which can be performed: internal scripts (scripts in the current file) and external scripts (scripts in other files). 
  1847.   Remember that when you use the Perform Script command to execute a script in another file, there is no need to use the Open command to open the file first.
  1848.   Whenever you are using the Go To Record command, you can go to the last record by specifying a record number which is very high, like 9
  1849. 9999. Make sure to perform this step "Without Dialog" to avoid getting an alert (or error) message.
  1850.   Remember that whenever you exit a Find or a Sort command, you are automatically placed in Browse mode, looking at the first record in the found set or the sort order: there is no need to use an Enter Browse Mode command or to go to the first record.
  1851.   Remember to use the Refresh command with an Enter Browse Mode step if you wish to copy the values from Summary fields.  However, copying
  1852. ep first; all of these commands allow you to specify a field for the operation.
  1853.   Replace and Reserialize can be interchangeable, if you perform the step with
  1854.  dialog and have the user make the choice of what command is performed.
  1855.   Remember that if you use the Relookup command, and you're using a calculation field as the matching value, you must specify one of the input fields for the calculation as the field parameter for the Relookup, not the calculation field (calculation fields cannot be used for the Relookup command).
  1856.   When you use the Copy command without any parameters, it copies all values from all fields on the current layout. If 
  1857. ield that has not already calculated, it will copy a null value. This happens because the script progresses before the summary field is given time to calculate.  
  1858.   Whenever you use the Enter Find Mode command and choose to Restore Find Requests, use the Perform Find command immediately after it. Be sure to uncheck the Restor
  1859. e option on the Perform Find command, if any changes to the find requests in the Enter Find Mode step will occur.
  1860.   Most script steps execute in the current file (i.e. the file where the script is defined). For example, to copy and paste between files, you will have to write two scripts: a script in the file where you want to copy and a script in the file where you wish to paste. In the script with the Copy command, include a Perform Script command that performs an external script, which
  1861.  describing a calculation, formula(s) will be displayed without instruction so that you can bypass the instructions and just copy the formula for use in your database.
  1862. If the record is describing a script, the script steps will be displayed without instruction so that you can examine them.
  1863. There are 6 scripts included with this database that you can import and modify for use with your database. Follow the directions for using these scripts (create any necessary fields, etc.), open your datC
  1864. abase, select ScriptMaker from the Scripts menu, click the Import button, and select this file (Calculations and Scripts.fp5). You will then be able to select the script you would like to import in your database.
  1865. e Mode command or to go to the first record.
  1866.   Remember to use the Refresh command with an Enter Browse Mode step if you wish to copy
  1867. Cancelm
  1868. mNo records were found
  1869. Arial
  1870. MS Sans Serif
  1871. Times New Roman
  1872. Courier
  1873. Verdana
  1874.     Helvetica
  1875. Palatino
  1876. Times
  1877. Geneva
  1878. Cancelm
  1879. mNo records were found
  1880. Open ScriptMaker
  1881. \\ZED\DoubleDuty
  1882. A)Printing Total Page Numbers with a Script
  1883. \\ZED\DoubleDuty
  1884. \\ZED\DoubleDuty
  1885. cript puts an X in the Mark field .
  1886. * If the values don't match, FileMaker Pro copies the ClientID value into Global. It doesn't change the Mark field.
  1887. 4. The script repeats step 3 until 
  1888. INFORMATION
  1889.     LAST NAME
  1890. NOTES
  1891. SEARCH
  1892. SUBJECT
  1893. TECHINFO
  1894. TITLE
  1895. TOTAL PAGES
  1896. ContentB
  1897. NotesB
  1898. CalculationB
  1899. SubjectB
  1900. TitleB
  1901. Search
  1902. TechInfoB
  1903. InformationB
  1904. Total PagesB
  1905. A    Client IDB
  1906. MarkB
  1907. Duplicate Check GlobalB
  1908. A    DateField
  1909. and, in some cases, notes.
  1910. The Instructions tab explains what you need to do to create a calculation or a script.
  1911. The Calculation or Script tab will show:
  1912. If the record is
  1913.  describing a calculation, formula(s) will be displayed without instruction so that you can bypass the instructions and just copy the formula for use in your database.
  1914. If the record is describing a script, the script steps will be displayed without instruction so that you can examine them.
  1915. There are 6 scripts included with this database that you can import and modify for use with your database. Follow the directions for using these scripts (create any necessary fields, etc.), open your dat
  1916. To always
  1917. Calculation, Date result)  =  
  1918.      OrderDate + 42 + Middle ("5432106",
  1919.       DayOfWeek (OrderDate), 1)
  1920. The text string "5432106" is used for each day of the week.  That is, if the date falls on a Sunday, we want to add 5 additional days in order to get to the following Friday.  4 for Monday, 3 for Tuesday, etc.
  1921. The calculation above can actually return ANY weekday in the f
  1922. uture, for ANY number of weeks.
  1923. To calculate a date that is X number of weeks in the future, just calculate 7 times X (where X is the number of weeks).  In this case, 7 days times 6 weeks = 42.
  1924. If you want to know the Monday 4 weeks in the future, you would type the following:
  1925. DueDate  (Calculation, Date result)  =
  1926.      OrderDate + 28 + Middle ("1065432",
  1927.       DayOfWeek (OrderDate), 1)
  1928. The number 28 is derived from four weeks multiplied by seven days per week.  Again, the string is si
  1929. This method assumes that your database has three fields:   DateStart (Date), TimeStart (Time) and TimeEnd (Time).  Unlike method 1, you do not need to enter the ending date.  However, only use this method if your elapsed times are always shorter than 24 hours.
  1930. To calculate the elapsed time, define a calculation field called ElapsedTime with this formula:
  1931. Mod (TimeEnd - TimeStart + 86400, 86400)
  1932. Alternate formula:  here's an alternative formula for method 2 that also works.
  1933. If (TimeEnd 
  1934. B= TimeStart, TimeEnd - TimeStart, TimeEnd - TimeStart + 86400)
  1935. Video Pl
  1936. TimeG<Calculating Elapsed Time When Ending Time is on the Same DayH
  1937. Number
  1938. 9. Sort the by the Match field.
  1939. Only the first record of each series of values in the Match field will show the Mat
  1940. Finding Duplicate Records
  1941. ate Records
  1942. \\ZED\DoubleDuty
  1943. C789       
  1944. Finding a Range of Dates
  1945. \\ZED\DoubleDuty
  1946. clearA
  1947. clickL
  1948. clientL
  1949. clientidL
  1950. cloneQ
  1951. columnD
  1952. columnarU
  1953. combinationJ
  1954. combineL
  1955. comfortableA
  1956. commandN
  1957. commandsQ
  1958. compareE
  1959. comparesL
  1960. comparingL
  1961. complexA
  1962. compressedQ
  1963. conceptA
  1964. conjunctionE
  1965. containedM
  1966. containingJ
  1967. createI
  1968. creatingA
  1969. currentfoundcountI
  1970. customerL
  1971. dataB
  1972. databaseF
  1973. dateA
  1974. dateendF
  1975. datefieldK
  1976. datesG
  1977. datestartF
  1978. datetotextK
  1979. dayofweekG
  1980. daysA
  1981. numberM
  1982. daysfutureM
  1983. defineL
  1984. definedJ
  1985. definitionsJ
  1986. deleteL
  1987. deletingL
  1988. deletionL
  1989. dependingI
  1990. describeA
  1991. designA
  1992. designedA
  1993. desiredA
  1994. determineD
  1995. determinesA
  1996. determiningD
  1997. dialogL
  1998. differenceA
  1999. differentA
  2000. difficultD
  2001. displayA
  2002. displayedB
  2003. displayingA
  2004. displaysE
  2005. dividingD
  2006. doesn'tL
  2007. don'tD
  2008. doneL
  2009. downA
  2010. dropD
  2011. duplicateL
  2012. duplicatesL
  2013. falseA
  2014. Title (Calculation, text result)=
  2015. If(LeftWords(FullName, 1) = "mr" 
  2016. or LeftWords(FullName, 1) = "mrs" 
  2017. or LeftWords(FullName, 1) = "ms" 
  2018. or LeftWords(FullName, 1) = "dr",
  2019. LeftWords(FullName, 1)  & ".", 
  2020. If(LeftWords(FullName, 1) = "miss", LeftWords(FullName, 1), ""))
  2021. FirstName (Calculation, text result)=
  2022. If(IsEmpty(Title), LeftWords(FullName, 1), MiddleWords(FullName,2, 1))
  2023. Suffix (Calculation, text result)=
  2024. If(RightWords(FullName, 1) = "II" or RightWords(FullName, 1) = "III" or RightWo
  2025. rds(FullName, 1) = "IV" or RightWords(FullName, 1) = "V" or 
  2026. RightWords(FullName, 1) = "Sr" , RightWords(FullName, 1), 
  2027. If(RightWords(FullName, 1) = "Jr" or RightWords(FullName, 1) = "Esq"or
  2028. RightWords(FullName, 1) = "Sr", RightWords(FullName, 1) & ".", ""))
  2029. LastName (Calculation, text result)=
  2030. If(IsEmpty(Suffix)=1, RightWords(FullName, 1), LeftWords(RightWords(FullName, 2), 1))
  2031. MiddleName (Calculation, text result)=
  2032. Case(IsEmpty(Title) = 1 and MiddleWords(FullName, 2, 1) <> lastname, Mi
  2033.  Righ
  2034.        2       3       4       5
  2035. Monday               0        1      2       3      4 
  2036. Tuesday             0        1      2       3      6
  2037. Wednesday      0        1      2       5      6
  2038. Thursday            0        1      4       5      6
  2039. Friday                    0        3      4       5      6
  2040. To determine the day of the week for StartDate, we can use the Mod() function (with 7) and subtract a known Sunday date from StartDate (The first known Sunday date in the Macintosh system is J
  2041. anuary 3, 1904).  This results in a value from zero (Sunday) through six (Saturday).  If the result is Wednesday (value returned is 3), somehow, we want to drop down to the Wednesday row.  Then, determine the number of excess work days above a multiple of five and move across to obtain the appropriate number of actual days.
  2042. This can all be accomplished by putting the entire table into one string, one row following the next.  That is,
  2043.      "12345012340123601256014560345623456"
  2044. To find the
  2045. end.  For example, if the Starting Date is a Friday, and one day is added, then somehow, we want to return the following Monday.
  2046. The chart below will help us determine the ending day of the week given the Starting day of the week (left column) and the the number of excess work days over the five day multiple (top row).
  2047. Work Days    0    1    2     3     4
  2048. Sunday     M    Tu    W    Th    F
  2049. Monday     M    Tu    W    Th    F 
  2050. Tuesday    Tu     W     Th    F    M
  2051. Wednesday    W    Th    F    M    Tu
  2052. Thursday    Th    F    M     Tu    W
  2053. Friday    F     M    Tu     W    Th
  2054. Saturday    M    Tu    W    Th    F
  2055. Sunday and Saturday are included in case StartDate is accidentally entered as a weekend date.  That is, if the StartDate is a Sunday, and the excess multiple is zero, we don't want to return Sunday, but the following Monday.  Using the chart, for a StartDate of Wednesday and three excess days brings us to the following Monday.
  2056. Now, change the table so that the number of actual days replaces the day of the week:
  2057. Work Days           0      1       2       3       4
  2058. Sunday                1
  2059. Given a starting date and a number of working days, an ending date can be calculated.  This calculation assumes your two fields are named StartDate (date field) and WorkDays (number field), and there are five working days per week.
  2060. Here's the logic:
  2061. 1. Since there are five working days per week, convert each five working days into seven actual days.
  2062. 2. For those extra days that do not make up a group of five, add them to the starting date.
  2063. 3. If the ending date falls on either a weekend 
  2064. or across a weekend, add two more days.
  2065. From logic step #1, use the Int() function, dividing by five, to determine the number of five day multiples, or actual weeks.  With this result, multiply by seven to get the number of actual days.  That is,
  2066.      Int (WorkDays/5) * 7
  2067. From step #2, use the Mod() function to determine the excess days over the five day multiples.  That is,
  2068.      Mod (WorkDays,5)
  2069. The difficult step is logic step #3 - determining if the excess days takes us across a week
  2070. Note:  FileMaker calculates time in seconds.  When you subtract one time from another, FileMaker calculates the difference as the number of seconds.  Therefore, it's easiest to calculate time based on seconds, rather than as hours, minutes and seconds.  The 86400 equals the number of seconds in a day.  When you set the calculation field to result in time, FileMaker converts the number (of seconds) to time (hours:minutes:seconds).
  2071. Recent S
  2072. ElapsedTime (calculation, time) =
  2073. Mod (TimeEnd - TimeStart + 86400, 86400)
  2074. TimeG<Calculating Elapsed Time When Ending Time is on the Same Day
  2075. mula:  here's an alternative formula for method 2 that also works.
  2076. If (T
  2077. termining if the excess days takes us across a we
  2078. nested
  2079. statements
  2080. calculating
  2081. blank
  2082. instead
  2083. calculating
  2084. future
  2085. based
  2086. weeks
  2087. calculating
  2088. finish
  2089. start
  2090. number
  2091. calculating
  2092. person's
  2093. calculating
  2094. elapsed
  2095. ending
  2096. later
  2097. calculating
  2098. elapsed
  2099. ending
  2100. calculating
  2101. number
  2102. weekdays
  2103. between
  2104. dates
  2105. comparison
  2106. statements
  2107. conditional
  2108. script
  2109. using
  2110. status
  2111. functions
  2112. extracting
  2113. title
  2114. first
  2115. middle
  2116. suffix
  2117. finding
  2118. range
  2119. dates
  2120. using
  2121. scriptmaker
  2122. finding
  2123. duplicate
  2124. records
  2125. finding
  2126. future
  2127. dates
  2128. formatting
  2129. numbers
  2130. calculation
  2131. field
  2132. identifying
  2133. duplicate
  2134. records
  2135. printing
  2136. total
  2137. numbers
  2138. script
  2139. scriptmaker
  2140. including
  2141. recipient
  2142. email
  2143. message
  2144. self-join
  2145. relationship
  2146. examples
  2147. FullAge (calculation, text result) =
  2148. NumToText (Year (Today) - Year (Birthdate) - If (Today < Date (Month (Birthdate), Day (Birthdate), Year (Today)), 1, 0)) & " Years, " & NumToText (Mod (Month (Today) - Month
  2149. (Birthdate) + 12 - If (Day (Today) < Day (Birthdate), 1, 0), 12)) & " Months, " & NumToText (Day (Today) - Day (Birthdate) + If (Day (Today) >= Day (Birthdate), 0, If (Day (Today -
  2150. Day (Today)) < Day (Birthdate), Day (Birthdate), Day (Today - Day (Today))))) & " Days"
  2151. DateG
  2152. Calculating a Person's Age
  2153. illustrateU
  2154. immediatelyQ
  2155. importQ
  2156. importantA
  2157. importingI
  2158. improvementH
  2159. includeL
  2160. includedD
  2161. includesN
  2162. indexQ
  2163. indicateR
  2164. informationP
  2165. infrastructureU
  2166. initialJ
  2167. inputQ
  2168. insideA
  2169. instanceU
  2170. instancesU
  2171. insteadB
  2172. instructionU
  2173. internalQ
  2174. intoA
  2175. invoiceA
  2176. invoicesA
  2177. isemptyJ
  2178. it'sA
  2179. itemU
  2180. itselfU
  2181. januaryD
  2182. justQ
  2183. kindA
  2184. knowA
  2185. knownD
  2186. labelU
  2187. largeQ
  2188. lastJ
  2189. layoutI
  2190. layoutsI
  2191. leadA
  2192. leavesD
  2193. leavesD
  2194. potentialA
  2195. precedingA
  2196. previousA
  2197. probablyA
  2198. processA
  2199. processedA
  2200. processesA
  2201. puttingD
  2202. questionA
  2203. questionsA
  2204. readA
  2205. real-worldA
  2206. Import the script "Finding a Range of Dates", and modify it for use with your database.
  2207. hrol Panels
  2208. ScriptsG*Finding a Range of Dates Using ScriptMaker
  2209. Script
  2210. The following sections explain how to set up a database and define a script to find duplicate records. For this example, you should understand global fields and know how to define fields. 
  2211. CAUTION: Deleting records is NOT undoable. Use of this script to delete duplicate records should be run on a copy of your database file. Always make a backup of your database before performing any scripts that include steps for deletion of records.
  2212. Example step 1: Identify or create a unique value for
  2213. eachA
  2214. easierA
  2215. eitherD
  2216. elapsedF
  2217. elapsedtimeW
  2218. eliminateA
  2219. eliminationA
  2220. elseA
  2221. emailR
  2222. enddateG
  2223. endingD
  2224. englishA
  2225. enterF
  2226. enteredD
  2227. entireD
  2228. equalA
  2229. equationH
  2230. errorI
  2231. evaluatedA
  2232. exampleA
  2233. examplesG
  2234. excellentH
  2235. excessD
  2236. executeQ
  2237. existingE
  2238. exitL
  2239. expandedA
  2240. explainL
  2241. extendedU
  2242. externalQ
  2243. extraD
  2244. extractJ
  2245. fallsD
  2246. falseA
  2247. fasterU
  2248. asterU
  2249. unnecessaryA
  2250. untilA
  2251. usedQ
  2252. user'sU
  2253. usesI
  2254. usingA
  2255. usuallyA
  2256. valueB
  2257. valuesD
  2258. veryH
  2259. viewI
  2260. wantD
  2261. wednesdayD
  2262. weekD
  2263. weekendD
  2264. weeksD
  2265. wereA
  2266. whatA
  2267. whenA
  2268. perform
  2269. script
  2270. command
  2271. there
  2272. types
  2273. wheneverQ
  2274. whereQ
  2275. whetherH
  2276. whichA
  2277. whileL
  2278. willB
  2279. windowQ
  2280. workdays/5D
  2281. workingD
  2282. wouldA
  2283. writeQ
  2284. yearE
  2285. yearsE
  2286. yes/noA
  2287. obtain
  2288. calculation
  2289. results
  2290. whether
  2291. create
  2292. calculation
  2293. field
  2294. includeN
  2295. you'llL
  2296. you'reQ
  2297. yourA
  2298. zeroB
  2299. recordsI
  2300. referencingU
  2301. refreshQ
  2302. relatedQ
  2303. relationshipU
  2304. relationshipsU
  2305. reliablyQ
  2306. relookupQ
  2307. remainingG
  2308. rememberA
  2309. repeatH
  2310. repeatsL
  2311. replaceL
  2312. replacedA
  2313. replacesD
  2314. reportU
  2315. requestL
  2316. requestsQ
  2317. requiredA
  2318. requiresH
  2319. restoreL
  2320. resultA
  2321. result
  2322. result
  2323. resultsA
  2324. returnD
  2325. returnedD
  2326. returnsD
  2327. rightN
  2328. rightwordsJ
  2329. roundN
  2330. rowsU
  2331. sameH
  2332. sampleB
  2333. satisfactoryH
  2334. saturdayD
  2335. saveQ
  2336. saysA
  2337. scoreH
  2338. screenQ
  2339. scriptI
  2340. seriesA
  2341. settingL
  2342. settingsL
  2343. sevenD
  2344. shouldB
  2345. showI
  2346. simplestA
  2347. simplyM
  2348. sinceA
  2349. singleA
  2350. single
  2351. record
  2352. viewI
  2353. situationA
  2354. sizeQ
  2355. someB
  2356. somehowD
  2357. sortL
  2358. sortsL
  2359. specifiesQ
  2360. specifyQ
  2361. specifyingQ
  2362. startdateD
  2363. startdate
  2364. dateM
  2365. matterA
  2366. menuL
  2367. messageI
  2368. messagesR
  2369. middlewordsJ
  2370. mightA
  2371. minutesF
  2372. missJ
  2373. modeI
  2374. mondayD
  2375. monitorQ
  2376. monthE
  2377. monthsE
  2378. moreA
  2379. mostQ
  2380. moveD
  2381. multipleD
  2382. multiple
  2383. record
  2384. viewI
  2385. multiplesD
  2386. multiplyD
  2387. mustM
  2388. nameJ
  2389. namedD
  2390. namesJ
  2391. needF
  2392. neededA
  2393. needsH
  2394. nestedA
  2395. nestsA
  2396. nextA
  2397. noteF
  2398. notedB
  2399. nullQ
  2400. numberA
  2401. numberfieldN
  2402. numericN
  2403. numtotextE
  2404. obtainD
  2405. obtainedE
  2406. occurQ
  2407. occursD
  2408. onesA
  2409. onlyA
  2410. openQ
  2411. operationQ
  2412. optimallyA
  2413. optionQ
  2414. orderL
  2415. ordinaryJ
  2416. originalJ
  2417. otherH
  2418. overA
  2419. pageP
  2420. pagesP
  2421. parameterQ
  2422. startingA
  2423. startupQ
  2424. statementA
  2425. statementsA
  2426. statisticalU
  2427. statusI
  2428. stepD
  2429. stepsK
  2430. stillA
  2431. storeL
  2432. storedU
  2433. stringD
  2434. sub-summaryU
  2435. subsequentA
  2436. substituteA
  2437. subtractD
  2438. suffixJ
  2439. summaryQ
  2440. sundayD
  2441. sureQ
  2442. switchL
  2443. syntaxA
  2444. systemD
  2445. tableD
  2446. tabsQ
  2447. takeG
  2448. takenA
  2449. takesD
  2450. containsD
  2451. convertD
  2452. copiedQ
  2453. copiesL
  2454. copyL
  2455. copyingQ
  2456. correctA
  2457. correctlyJ
  2458. couldA
  2459. countU
  2460. courseU
  2461. courseU
  2462. creatingA
  2463. currentN
  2464. currentfoundcountI
  2465. currentpagenumberP
  2466. customerL
  2467. dataB
  2468. databaseF
  2469. dateA
  2470. date/time/userQ
  2471. dateendF
  2472. datefieldK
  2473. datesG
  2474. datestartF
  2475. datetotextK
  2476. dayofweekG
  2477. daysA
  2478. numberM
  2479. daysfutureM
  2480. decimalN
  2481. defineL
  2482. definedJ
  2483. definitionsJ
  2484. deleteL
  2485. deletingL
  2486. deletionL
  2487. dependingI
  2488. describeA
  2489. designA
  2490. designedA
  2491. desiredA
  2492. destinationQ
  2493. determineD
  2494. determinesA
  2495. determiningD
  2496. dialogL
  2497. differenceA
  2498. differentA
  2499. difficultD
  2500. displayA
  2501. displayedB
  2502. displayingA
  2503. displaysE
  2504. dividingD
  2505. documentP
  2506. doesn'tL
  2507. don'tD
  2508. doneL
  2509. downA
  2510. dropD
  2511. duplicateL
  2512. duplicatesL
  2513. followingD
  2514. followsN
  2515. footerP
  2516. forceQ
  2517. rmatE
  2518. formattedB
  2519. formattingN
  2520. formulaA
  2521. formulasB
  2522. foundI
  2523. fourA
  2524. fridayD
  2525. fromA
  2526. fullE
  2527. fullageE
  2528. fullnameJ
  2529. functionB
  2530. futureM
  2531. generateU
  2532. generatedU
  2533. gettingQ
  2534. givenD
  2535. given
  2536. starting
  2537. number
  2538. working
  2539. endingD
  2540. givesU
  2541. givingQ
  2542. globalK
  2543. globalfield1K
  2544. globalfield2K
  2545. goesL
  2546. goodH
  2547. greatA
  2548. greaterA
  2549. groupA
  2550. groupedL
  2551. groupingD
  2552. guessA
  2553. guideU
  2554. happensA
  2555. haveA
  2556. havingU
  2557. headerP
  2558. helpD
  2559. hereB
  2560. here'sD
  2561. here's
  2562. logicD
  2563. highQ
  2564. higherA
  2565. hoursF
  2566. howeverA
  2567. identificationL
  2568. identifiesL
  2569. identifyL
  2570. identifyingU
  2571. chartA
  2572. checkH
  2573. chooseL
  2574. clarityR
  2575. arityR
  2576. wishN
  2577. withA
  2578. withinQ
  2579. withoutJ
  2580. wordQ
  2581. workD
  2582. workdaysD
  2583. workdays/5D
  2584. workingD
  2585. worksR
  2586. wouldA
  2587. writeQ
  2588. yearE
  2589. yearsE
  2590. yes/noA
  2591. obtain
  2592. calculation
  2593. results
  2594. whether
  2595. create
  2596. calculation
  2597. field
  2598. includeN
  2599. you'llL
  2600. you'reQ
  2601. yourA
  2602. zeroB
  2603. zoomQ
  2604. scriptmakerK
  2605. scriptsL
  2606. secondsF
  2607. sectionsL
  2608. selectU
  2609. self-joinU
  2610. self-joiningU
  2611. sendR
  2612. sentR
  2613. separateJ
  2614. separatedQ
  2615. serialU
  2616. serialnumberU
  2617. seriesA
  2618. settingL
  2619. settingsL
  2620. sevenD
  2621. shareU
  2622. shorterW
  2623. shouldB
  2624. showI
  2625. showingU
  2626. showsU
  2627. sideU
  2628. sidesU
  2629. similarU
  2630. simplestA
  2631. simplyM
  2632. sinceA
  2633. singleA
  2634. single
  2635. record
  2636. viewI
  2637. situationA
  2638. sizeQ
  2639. someB
  2640. somehowD
  2641. sortL
  2642. sortedU
  2643. sortsL
  2644. spaceR
  2645. specifiesQ
  2646. specifyQ
  2647. specifyingQ
  2648. startU
  2649. startdateD
  2650. startdate
  2651. dateM
  2652. tdate
  2653. dateM
  2654. methodF
  2655. middleJ
  2656. middlenameJ
  2657. middlewordsJ
  2658. midpointU
  2659. mightA
  2660. minutesF
  2661. missJ
  2662. modeI
  2663. mondayD
  2664. monitorQ
  2665. monthE
  2666. monthsE
  2667. moreA
  2668. mostQ
  2669. moveD
  2670. multipleD
  2671. multiple
  2672. record
  2673. viewI
  2674. multiplesD
  2675. multiplyD
  2676. mustM
  2677. myfileU
  2678. myfilematchU
  2679. nameJ
  2680. namedD
  2681. namesJ
  2682. needF
  2683. noteF
  2684. notedB
  2685. nullQ
  2686. numberA
  2687. numberfieldN
  2688. numericN
  2689. numtotextE
  2690. obtainD
  2691. obtainedE
  2692. occurQ
  2693. occursD
  2694. onceU
  2695. onesA
  2696. onlyA
  2697. onscreenU
  2698. openQ
  2699. operationQ
  2700. optimallyA
  2701. optionQ
  2702. orderL
  2703. ordinaryJ
  2704. originalJ
  2705. otherH
  2706. overA
  2707. pageP
  2708. pagesP
  2709. parameterQ
  2710. createI
  2711. createdU
  2712. creatingA
  2713. creationU
  2714. currentN
  2715. currentfoundcountI
  2716. currentpagenumberP
  2717. customerL
  2718. d159U
  2719. dataB
  2720. databaseF
  2721. dateA
  2722. date/time/userQ
  2723. dateendF
  2724. datesG
  2725. datestartF
  2726. datetotextK
  2727. dayofweekG
  2728. daysA
  2729. numberM
  2730. daysfutureM
  2731. decimalN
  2732. defineL
  2733. definedJ
  2734. definitionsJ
  2735. deleteL
  2736. deletingL
  2737. deletionL
  2738. dependingI
  2739. describeA
  2740. designA
  2741. designedA
  2742. desiredA
  2743. destinationQ
  2744. determineD
  2745. determinesA
  2746. determiningD
  2747. dialogL
  2748. differenceA
  2749. differentA
  2750. difficultD
  2751. displayA
  2752. displayedB
  2753. displayingA
  2754. displaysE
  2755. dividingD
  2756. documentP
  2757. doesn'tL
  2758. don'tD
  2759. doneL
  2760. doubleU
  2761. downA
  2762. dropD
  2763. dupcheckU
  2764. duplicateL
  2765. duplicatesL
  2766. autoU
  2767. automaticallyQ
  2768. averageU
  2769. avoidQ
  2770. b456U
  2771. backA
  2772. backupL
  2773. balanceN
  2774. basedA
  2775. becauseA
  2776. becomesA
  2777. beenR
  2778. beforeA
  2779. beginningD
  2780. beingB
  2781. belowA
  2782. besideU
  2783. bestA
  2784. betweenA
  2785. birthdateE
  2786. birthdayL
  2787. blankB
  2788. blockP
  2789. bothA
  2790. bringQ
  2791. bringsD
  2792. brokenA
  2793. browseL
  2794. buildN
  2795. buildingA
  2796. building
  2797. calculations
  2798. nested
  2799. statementsA
  2800. c789U
  2801. calculateQ
  2802. calculatedD
  2803. calculatesA
  2804. calculationA
  2805. calculationsA
  2806. calledE
  2807. cannotN
  2808. captureI
  2809. caretR
  2810. caseA
  2811. casesQ
  2812. categoriesA
  2813. cautionL
  2814. changeD
  2815. changedU
  2816. changesQ
  2817. neededA
  2818. needsH
  2819. nestedA
  2820. nestsA
  2821. nextA
  2822. noteR
  2823. notedB
  2824. nullQ
  2825. numberA
  2826. numberfieldN
  2827. numericN
  2828. numtotextE
  2829. observeU
  2830. obtainD
  2831. obtainedE
  2832. occurQ
  2833. occursD
  2834. onceU
  2835. onesA
  2836. onlyA
  2837. onscreenU
  2838. openQ
  2839. operationQ
  2840. optimallyA
  2841. optionQ
  2842. orderL
  2843. ordinaryJ
  2844. originalJ
  2845. otherH
  2846. overA
  2847. pageP
  2848. pagesP
  2849. parameterQ
  2850. formatE
  2851. formattedB
  2852. formattingN
  2853. formulaA
  2854. formulasB
  2855. foundI
  2856. fourA
  2857. fridayD
  2858. fromA
  2859. fullE
  2860. fullageE
  2861. fullnameJ
  2862. functionB
  2863. futureM
  2864. generateU
  2865. generatedU
  2866. gettingQ
  2867. givenD
  2868. given
  2869. starting
  2870. number
  2871. working
  2872. endingD
  2873. givesU
  2874. givingQ
  2875. globalK
  2876. globalfield1K
  2877. globalfield2K
  2878. goesL
  2879. goodH
  2880. greatA
  2881. greaterA
  2882. groupA
  2883. groupedL
  2884. groupingD
  2885. guessA
  2886. guideU
  2887. happensA
  2888. haveA
  2889. havingU
  2890. headerP
  2891. helpD
  2892. hereB
  2893. here'sD
  2894. here's
  2895. logicD
  2896. highQ
  2897. higherA
  2898. hoursF
  2899. howeverA
  2900. identificationL
  2901. identifiesL
  2902. identifyL
  2903. identifyingU
  2904. Search
  2905. Overview - Calculation
  2906. Overview - Notes
  2907. Overview - Instructions
  2908. Information
  2909. Single Record View
  2910. Multiple Record View
  2911. Import the script "Including the Recipient Name in an Email Message", and modify it for use with your database.
  2912. ScriptsG;Send Mail: Including the Recipient Name in an Email Message
  2913. has been used to indicate where you should type a space.
  2914.  Set up the Send Mail script step to use a field value for the 
  2915.  field, and specify the
  2916. Email To cC
  2917. alculation field.
  2918.  A field yielding any of the following formats will work:
  2919.  (Sally Jones) sally_jones@host.com
  2920.  sally_jones@host.com (Sally Jones)
  2921.  Sally Jones <sally_jones@host.com>
  2922.  "Sally Jones" <sally_jones@host.com>
  2923. e where yo
  2924. space.
  2925. @ind a rang
  2926.     8/18/1999
  2927.