July 24, 200916 yr Newbies I am presently trying to perform some black magic with repeating fields. I want to take a repeating field and output only certain lines of it based either on an inline variable (say, Char (1) = "$") or on a corresponding repeating table with true false values. Unfortunately my knowledge of filemaker scripting is quite shaky, and lacking traditional variables with which to increment my way through the series of lines (and any condition to stop on), I am rather stuck. The first character of any repetition after the first no longer appears to be 0. Maybe my fuzziness is theoretical. If logic in a repeating field is applied only in a lump sum, then everything I am doing is unhelpful (in retrospect this seems more obvious, but when you stare at something long enough nothing is clear any more.) So my question is how do I parse though this series of lines outputting only lines that begin with $ (minus the $, but thats the easy bit). Thanks in advance, Conrad
July 24, 200916 yr Char(1) = "$" will NEVER return true. To get the first character of text, use = Left ( text ; 1 )
July 24, 200916 yr Author Newbies Ok, well that explains why that fragment didn't work. (I guess you're saying char () is a casting function not a position one...?) I did however already try replacing that logic with a left() based one. Results were still unhelpful. I'll do some more playing around tomorrow when I can get my hands on the database again.
July 24, 200916 yr I guess you're saying char () is a casting function not a position one...? No, I am definitely NOT saying that. I will say that you should get familiar with Filemaker functions and calculation syntax. I don't think I can say more than that, because I don't understand what you're trying to do (and why).
July 24, 200916 yr Conrad, If you define a calculation field with the same number of repetitions as the repeating field you are trying to parse, then the calculations will be performed "slotwise" -- i.e. the nth repetition in the calculation will look only at the nth repetition in the text field. So if you have a repeating field, and you want to identify which repetitions begin with the character "$", I think all you need to do is to define a calculation field (with the same number of repetitions) by Left ( yourfield ; 1 ) = "$". You will see that the calculation field appears as a row (or column) of 1's and 0's.
July 28, 200916 yr Generally if you have problems with repeating fields, you shouldn't be using them in the first place. With a standard item table, this would just be a find operation.
Create an account or sign in to comment