Jump to content

This topic is 5667 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

  • Newbies
Posted

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.

Posted

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).

Posted

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.

Posted

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.

This topic is 5667 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.