Newbies lizard294 Posted March 3, 2008 Newbies Posted March 3, 2008 Hi everyone, I am trying to write a Filemaker 9 script that accesses a group of text fields that are named with sequential numbers. Example: Item1 Item2 Item3 Is there a way to read data from these fields sequentially by calculating the field names? I was hoping to do something like: TableName::Item$LoopNumber The above doesn't work, however. Is there any way to do this in filemaker? Thanks!
comment Posted March 3, 2008 Posted March 3, 2008 Try something like: GetField ( "TableName::Item" & $LoopNumber )
Newbies lizard294 Posted March 3, 2008 Author Newbies Posted March 3, 2008 Works perfectly, thanks for the help!! Is there an equivalent function to GetField to save new field contents?
Mark DeNyse Posted March 4, 2008 Posted March 4, 2008 lizard, There's no straight-up equivalent for a SetField() inverse of what you seek, but there are a number of tricks that people have posted here. One that I've used (if you have 8.5 or later) is to calculate the field name and pass it to GoToObject(), then use SetField() without specifying the target field (since you're already where you need to be via GoToObject() ). The one catch is that you have to give object names to each of the fields you want to use.
Recommended Posts
This topic is 6446 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 accountSign in
Already have an account? Sign in here.
Sign In Now