Automated Replace similar to FileMaker

It there a way replace data across records in Servoy similar to the way it is done in FileMaker? Specifically, I am trying to figure out how to identify the field name of a field that currently has focus so that data in each record for that field can be replaced using a loop. I would like to avoid having to create a different method for each field?

There’s a couple of ways you can do it:

  1. Use application.getMethodTriggerElementName() to get the name of the element that is triggering the method. If you set the NAME property of the element to the same as the field - you’re done.

  2. You can set the “onFocusGained” property of the field to set the name of the field in a global, then execute the method.

I have a bigger question - why are you replacing all that data? You can use databaseManager.getFoundSetUpdater(Object foundset) to update the foundset. (Use the move sample to see an example)

Hope this helps.

Harjo posted a tip with example on http://www.servoymagazine.com that did just that.
No need for looping through your foundset.

HTH

I love it!

Thank you very much.