Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Go to field according to parameter

Featured Replies

Is there any way to pass a field name as a parameter, to use it on a Go to field step?

I have 10 different buttons and 10 fields. When the user press each button, a script is run passing the optional parameter. A different parameter is passed with each button. This parameter is a field name. Then, I would like to use this parameter in the script to go to the corresponding field: button1 > field1, button2 > field2, etc.

It would save me a lot of scripting because I can use one script for all the buttons. If I can further enhance it and pass the vfield name, then only a couple lines should suffice for many different fields.

I was thinking in something like:

Go to field ( Get (ScriptParameter))

but I cannot find a way to script it.

Thanks

Hi, bluearrow

take a look at this topic !

I think that it will be good for you ! :)

bluearrow, it's a complex subject but need not be; at least (I believe) for the type of functionality you require. Here's a sample of two views: First is using script parameter to specify the field the cursor should go to (passes field name). I use (the powerful) Exit Loop If[ ] because it has the ability to FIND a field easily even though not directly specified.

It is of course, part of what's being discussed in the thread Daniele referenced but I thought an example might be of benefit. Parameters on the buttons and concatenated test within an Exit loop If[] controls where the cursor STOPS; which is (in reality) not much different than specifying which field to go TO.

The wave technique in the file is a cheap, lazy example of producing effects to draw the eye of the User. I have yet to succeed running it through repetitions tho - it always stops at the second rep. But sometimes I'll use it for a quick flash to draw attention somewhere on the screen without having to result to pulsing paused scripts, etc. I make it look better than this of course. I just wanted you see some flexible options using a method that sounds complex or convoluted. It works quite well when the needs are simpler.

LaRetta

TheWave.zip

  • Author

Thank you both for yuor replies. I read the topic and reviewed the sample file. The first example in this file was exactly what I needed. I tested it and it is working fine, going to the field stated in the parameter.

I am a little bit reluctant to use looping scripts though, but I will try to find a way to control what happens if something goes wrong (for instance, if the field name is changed, but not the parameter passed to the script...)

I wish FileMaker would add in the next version the posibility to pass the parameter directly in the Go to field step, or in Set Field.

Thanks again.

Hi LaRetta

do you remember our Loop/Exit Loop discussion ?

Your file is a good example were is better to place the exitLoop quickly after Loop ! :)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.