dysong3 Posted April 20, 2017 Posted April 20, 2017 Hi, 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 Quote An operator (e.g. +, -, *, …) is expected here. 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.
hutchlad Posted July 31, 2017 Posted July 31, 2017 (edited) Dysong, Most custom functions built by other people require a Function Parameter. Such as 'StartDate' or whatever bit of information is needed in the function. It is a common mistake for people to overlook this, EDIT - I didn't notice the post had been edited and OP had found a solution. /closed Edited July 31, 2017 by hutchlad
Recommended Posts
This topic is 2936 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now