Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I am writing a script that I need to use the "Go To Field" is the fieldname specified in a global $$Fieldname variable? Any ideas? Perhaps there is a different scriptstep that I should be using? :B

Posted

I am trying to collect data from a user to be inserted into the field that they specify. So an example might be that the user chooses "Field A" to have "Company XYZ" data entered into "Field A". This "Company XYZ" would be entered into "Field A" for all of the records in the current found set. Does that help?

Posted

The idea is to automate some of the data entry that we are currently doing. One set of project specific records can be up to 700 entries. Of course there may only be 30 recordes that need "Company XYZ" entered into "Field A". And the next set of data that needs to be entered may be "3/12/08" into "Field B" for 15 records. Many of my users are Excel proficient and love the Ctrl+D function for data entry.

Posted

To expand on what _henry_ said, use Go to Object rather than Go to Field.

On your layout, use the Object Info palette to give the fields object names that correspond the values that the user can select (e.g. "Field A").

In your script use Go to Object and then Set Field, but DON'T specify which field. The value will then magically go to the current object (i.e. the chosen field).

Posted (edited)

If you have a found set, why not just use the [color:blue]Ctrl + = Keyboard short cut, for Replacing the contents of a field. This replaces the field contents in whatever field selected, with the content of that field for all of the records of the found set.

Lee

Edited by Guest
  • 2 months later...
  • Newbies
Posted

So, I also would like to perform get/set operations on dynamically specified fields. It seems that the only way to dynamically reference a field is via its Object Name. Of course, I haven't set any Object Names in advance, so I was thinking of writing a script to loop through each field on each layout and set its Object Name to be the name of the field.

Problems are: 1) there's no script step to SET an Object Name, and 2) there's no way to go to the (arbitrarily) "first" field on a layout in order to loop through with Go To Next Field. Are both of those statements correct?

Thanks a bunch,

FMP24060

Posted

1. No, of course not - how would you specify which object to name?

2. Go to Field[] followed by Go to Next Field will go to the first field in the tab order of the current layout.

  • Newbies
Posted

1. No, of course not - how would you specify which object to name?

Why, hypothetically you would set the name of the *current* object by not specifying which object. In just the same way as we Set Field[] above without specifying which field, in order to operate on the current field. This would be useful when looping through each field object in turn.

2. Go to Field[] followed by Go to Next Field will go to the first field in the tab order of the current layout.

Great, thanks for this... Just for sake of completeness, how would you tell when you've gone past the last field?

Posted

1. Yeah well, hypothetically... Speaking practically, naming an object is a layout modification, and there are no script steps that allow that - not even Enter Layout Mode.

2. See if this helps:

http://www.fmforums.com/forum/showtopic.php?tid/185471/post/244630/#244630

Note that I am not recommending this technique (rather the opposite). Also, it requires that there be only one instance of the first field in the tab order of the layout.

Posted (edited)

The bigger issue is that scripts don't work in layout mode.

Set Field dynamically is an oft requested function. Object works ok, but it would be great if FMI included the functionality. Keep your fingers crossed.

Edit: comment beat me again. I've got to stop sitting on my posts.

Edited by Guest
Posted (edited)

Excuse me for replying with propaganda, but this does exactly what you want (and what I have been dying for over years :) : http://www.bh-a.com/fmxlayoutassistant/

Still available at special rate after the French FM Conference.

Demo file and video available on web site.

Edited by Guest
  • 7 years later...
  • Newbies
Posted

I've found an alternative, if possibly not ideal, way to solve this problem on Brian Dunning's custom functions, which works if you have a Mac:

https://www.briandunning.com/cf/1240

The custom function basically concatenates an apple script that selects the desired field. I've put the function in a variable and then placed the variable as the calculation result of a Perform AppleScript script step, and it works like a charm! 

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