Jump to content

Refer to field name with variables?

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

Recommended Posts

  • Newbies

I'll try to give a quick example of my goal. First the relevant info:

field01, field02, ..., field50 - each has a drop-down menu where you can choose null(default), qty5, qty10, or qty15.

What I am trying to do is, for example, if I select 'qty10' in 'field25' it would fill in the value 'qty10' in field25-field34.

Now my thinking was along the lines of a PHP type program, using variables to address the fields and some sort of i++ loop. But I am finding out Filemaker doesn't really work that way, or at least doesn't seem to make it easy.

My attempt thus far has been:

Set Variable [$i; Value:Right (Get (ActiveFieldName) :2)] //gets numerical value of 'field'

if [Get (ActiveFieldContents ) = "qty10"

then I would do something like this (some type of PHP-esque while statment)

While $i; Set Field [tableName::field . $i; qty10] $i++; //and this would loop as necessary

But, I have not found a way to refer to incrementing (or individual) field names using concatenation or any other techniques. I did see a reference to using a Global variable and a calc field, but I didn't understand what they were saying. Any ideas? Hope this made some sense with my disregard to syntax.

Thanks for reading,


Edited by Guest
Link to comment
Share on other sites

May i ask as to the purpose of this at all?

I'm with Genx here, the field should be the same single field in 50 records, there is something wrong with the relational approach.

Is the idea that if you change a value should all the following below adjust to it?? The autoenter (updating) would be possible and even be quite tempting, but is pretty unhealthy if the entries in some way later should be scrutinized statistically, say a summary report?


Link to comment
Share on other sites

This topic is 5788 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.