October 31, 201411 yr Can you please help me make this syntax work. There probably is more than one thing broken with it... Do any of the characters in the allowedSubset need to be escaped or anything like that? Let ( allowedSubset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()_+=-[];',{}|"<>?" ; fieldArt = (Filter ( myFirstField ; allowedSubset )) ; fieldTtl = (Filter ( mySecondField ; allowedSubset )) ; mergedString = fieldArt & "_" & fieldTtl; Substitute ( mergedString ; ["å";"a"] ; ["é";"e"] ; ["ü";"u"] ) )
November 1, 201411 yr 1. A quote must be escaped when used as a literal character; 2. You must enclose multiple variable declarations in square brackets; 3. Once you have filtered the components of the merged string to contain only the allowed characters, it cannot contain "å", "é" or"ü" - so the Substitute() part is not doing anything; if you want it to have any effect, you must apply it before the Filter(); 4. There is no need for the outer parentheses in (Filter ( mySecondField ; allowedSubset )). Let ( [ mergedString = myFirstField & "_" & mySecondField ; preFilter = Substitute ( mergedString ; ["å";"a"] ; ["é";"e"] ; ["ü";"u"] ) ; allowedSubset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()_+=-[];',{}|"<>?" ] ; Filter ( preFilter ; allowedSubset ) ) See also: http://www.briandunning.com/cf/1291
November 1, 201411 yr Author ...interesting. Thank you I don't have FM Advanced, from what I gather the linked solution requires one
November 1, 201411 yr Since the CF in the link does not involve recursion (the function calling itself), it can be used in a calculation field.
November 1, 201411 yr Author Since the CF in the link does not involve recursion (the function calling itself), it can be used in a calculation field. thanks for the tip
Create an account or sign in to comment