A READER ASKS: Does This Variable Exist?

several times doing a scripting problem search I have hit your useful site

today again... alas could not find something (but my guess is it does NOT exist)
so maybe there is a workaround for it (as Filemaker seems at leat for 1/3 to be based on doing things with it it was not made for)

So here is my simple question:

I want to fill in a routine a series of fields of which I have a list, using a variable for their name

As far as I can see Filemaker has NO function for that

What I love to use would be a variant of the GetField("varianle") option



I can see no dedicated function here in FMP (8.5 Advanced)

Set Field(field name) can only be set manually while making a script

I would appreciate it if you could find a minute or so to answer

Well, I might be missing the total point in what you are wanting to do. So if I am, please follow up with a little more detail on the finer points and I’ll take a fresh shot at it.

FileMaker has the ability to set variables in two different ways and in some instances the lines blur between them. The first case is using the Set Variable script step and here is a link to that discussion ( The Set Variable Script Step ). The second method is done via calculations using the Let function and here is the link to my discussion on each ( The Let function ).

Both of the above discussion are fundamental and are painted with a very broad brush. ( by the way ... I had to edit that, I actually typed ... “painted with a very broad bush).

So you can set a variable in any number of ways, now we are deciding what to do with it. It sounds like you are wanting to parse the variable (the act of taking a big piece of data, cutting it into slices and placing each slice on a particular plate). This is done by using the family of text functions. Here are some links for those discussions ...

Text Functions
The Exact Function
The Filter Function
The FilterValues Function
The GetAsCSS Function
The GetAsDate Function
The GetAsNumber Function
The GetAsText Function
The GetAsTime Function
The Getastimestamp Function
The Left, Leftvalues And Leftwords Functions
The Length Function
The Lower, Upper And Proper Functions
The Middle, Middlevalues And Middlewords Functions
The Patterncount Function
The Position Function
The Replace Function
The Right, RightValues And RightWords Functions
The SerialIncrement Function
The Substitute Function
The Trim Function
The TrimAll Function
The ValueCount Function
The WordCount Function
Parse, Array And Concatenation

Now here you might want to cruise over to the custom function area of briandunning.com. Here you may find a custom function that does a parsing routine you like. The site is great but many of us which there was more background on each custom function. Some are commented great in the function itself but there isn’t a robust comment field for each custom function on the site (at the time I writing this).

Now you know how to slice the pie, you want to know how to place them on the particular plates. In this case, you will want to probably script a go to field or perhaps a go to object. The Go To Object allows you to setup a grid of named places to a set of named variables. This is what is commonly used in an information format called Named Value Pairs.

I wouldn’t be surprised if you could find some of the parts you need from one of two possible sites (other than mine own). This would be the Nightwing Enterprises site and DatabasePros site.