Here is a custom function that I found on Briandunning.com. The problem is when I try to create a new function with this code, Filemaker refuses it saying
The "here" above is situated before the parentheses after "WordWrap" and before "UnprocessedText". Would someone be kind enough to tell what I'm missing here to get this up and running?
Let ([ TruncatedText = Left ( Text ; Size + 1 ) ; CountOfSpaces = PatternCount ( TruncatedText ; " " ) ; CountOfReturns = PatternCount ( TruncatedText ; "¶" ) ; PositionOfLastSpace = If ( CountOfReturns > 0 ; Position ( TruncatedText ; "¶" ; 1 ; 1 ) ; Position ( TruncatedText ; " " ; 1 ; CountOfSpaces ) ); AddReturn = If ( CountOfReturns > 0 ; "" ; " ¶" ); ThisLine = Trim ( Left ( TruncatedText ; PositionOfLastSpace ) ) ; UnprocessedText = Right ( Text ; Length ( Text ) - PositionOfLastSpace ) ; Result = If ( Length ( Text ) ≤ Size ; Text; ThisLine & AddReturn & WordWrap ( UnprocessedText ; Size ) ) ]; Result ) Sorry everyone. Please dismiss my post. I just realised that I was trying to include "WordWrap" as a function parameter and as the function name. All's well.
I'm a dentist. I'm trying to generate written treatment plans for patients to have as a treatment estimate and for our records.
People have 32 teeth, therefore I have setup a field (ToothNumber), displayed as a checkbox set utilizing a value list = 1 through 32. When I click my CROWN script button, it opens a selection window wherein I choose the tooth number from said field (1-32), the material the crown is to be made of (porcelain, gold, zirconia, etc.), whether I want to use lab-processed temporary crowns, and so forth.
If I have only one tooth number checked and run through my nested IF statements, which looks up the official description for the type of crown, the ADA code, the fee, the time required, etc., it all works fine. If I have more than one tooth number selected in the checkbox set, it only returns one line for the first tooth checked.
The IF statement looks something like: If TOOTH NUMBER = 2 and CROWN MATERIAL = porcelain and LAB TEMP CROWN = "Yes" then it adds a line on the treatment items table which looks up appropriate description, ADA code and fee, so the patient has a copy and so do we. And we're both on the same page regarding what they want to accomplish.
Am I using the wrong method for displaying and relating my selections? If so, what's the best way to accomplish this. Also, I want to avoid repeating the same sequence for each tooth number, i.e., I'd rather LOOP to advance through tooth 1 through 32. Any ideas?
By Kurt Hansen
I have a calculated field that is based on the following. Now I want to add this:
If ( LABEL = "Eloquence" ;
ANTAL I ALBUM = 1 ; "79,50" ;
ANTAL I ALBUM = 2 ; "149,50" ;
ANTAL I ALBUM = 3 ; "219,50" ;
ANTAL I ALBUM = 4 ; "219,50" ;
Where and how do I put it in? I have tried almost everything, but I keep getting error messages.
--- Current definition ---
If ( GENRE = "Klassisk" or GENRE = "Jul" or GENRE = "Jazz" or GENRE = "Pop / Rock" or GENRE = "Soundtrack" or GENRE = "Traditional" or GENRE = "Tale" or GENRE = "Film";
If ( LABEL = "Brilliant" ;
NORMALPRIS = 34 ; "49,50" ;
VARENUMMER = 94137 ; "169,50" ;
Left ( VARENUMMER ; 5 ) = "GRAM," ; "70,00" ;
VARENUMMER = "CCS BOX 6414"; "349,50" ;
VARENUMMER = "AV 2313"; "799,50" ;
NORMALPRIS = 11 ; "29,50" ;
I am trying to create a field that will generate a list of phrases according to a criteria. It is based on input from a questionnaire, and designed to pull up the phrase whenever the answer to the corresponding field was higher than a one. Even though I set all the questions to two or three, the only one that is working here is the first one. In the merge field, it should list all of the phrases in quotes, but it only gives me "functional math." Can anyone see what is going on here? I am self-taught and really a novice on the calculation side of things.
Thanks so much.
If (Functional math deficits >=1; "functional math”,If (Functional reading deficits >=1; "functional reading”,If (Functional written language deficits >=1; "functional written language”,If (Impaired Theory of Mind >= 1; "theory of mind”,If (Difficulty reading social cues >=1; "social skills”,If (Difficulty sitting attending >= 1; "learning behaviors”,If (Lacks functional living skills >= 1; "functional living skills”,If (Lacks functional play skills >= 1; "play skills”,If (Lacks independent leisure skills >= 1; "independent leisure”,If (Is over 14 lacking vocational skills >= 1; "vocational skills”,If (Student has challenges with expressive language >= 1; "expressive language”,If (Student has significant delays in receptive language >= 1; "receptive language”,If (Gross motor deficits >= 1; "gross motor skills”,If (Fine motor deficits >= 1; "fine motor skills”,If (Need for schedule >= 7; "use of visual schedule”,If (Need for work systems >=7; "using work systems and task strips for independent routines”))))))))))))))))
I am not getting any errors when I save the calculation parameters (Probably not the right lingo...)
By rick altman
I have a field that receives a bunch of first names from a portal, thanks to the List function. The result might look like this:
Alice, Bill, Chuck
However, I need for the list to read:
Alice, Bill, and Chuck
I need to find the last comma in the text and add an "and" to it. I have been messing around with the Position function stuffed inside of a Substitute function, but I can't get it right. Can someone help?