July 4, 200619 yr After much searching I can't find a way to make this happen.....Is it possible? $FieldName = "Customer Name" Set Field $FieldName "Joe Blow" Thanks, Mel
July 4, 200619 yr Hi Mel, Yes. Check out FM Help on 'Set Variable script step.' A variable is not a field so this won't work (as you've requested): Set Field $FieldName "Joe Blow" You pass a value to a variable (such as from a field like CustomerName) with: Set Variable [ $CustomerName ; Value: CustomerNameField ]. Later in the script when you want to use that information, such as after jumping to a related table (or any table), script would use that variable such as: Set Field [ CustomerNameField ; $CustomerName ]. If this doesn't cover what you need, you'll need to explain how you want to use it. Your example doesn't provide enough information. LaRetta :wink2:
July 4, 200619 yr Author Thanks Laretta. I was hoping that FMP8 would somehow be able to extract the field name from the variable so I could set the field dynamically. Guess not. BTW... You've grown fur and are now wearing glasses. Everything OK?
July 4, 200619 yr Well, Mel, there is only one way to set a field dynamically and that is to Freeze Window and go to layout in which the fields reside and loop through them, testing each field as you go. The ability to specify a field via calculation, variable or global is something we all wish for and maybe vs. 9 will allow it. This hairless pink cat adds intelligence to my look, don't you think? Besides, he tickles me ...
July 4, 200619 yr Author It sure would save allot of key punching and the wear and tear on the 'ol grey cells! Thanks for the help! Mel
Create an account or sign in to comment