Replacing Data - getColumnName

New to Servoy coming from FMP 6.0 so please forgive me if the answer is obvious. I searched for a couple of days before posting this question.

Our solution frequently requires replacement of data on the fly in various columns. While I can create methods with loops, scripting for every column is very time-consuming and impractical.

I can use a Loop and replace data that way but I am really looking for a way to identify the column that has the focus to automate my Replace method. I’d like it to work without resorting to asking the user to specify the column.

I have looked at options like getColumnName but this requires know either the tab order (the column may or may not be in the tab order) or the columnNumber, which I do not know.

Any hope a Replace function will be available one day? If not, any suggestions?

Your help is greatly appreciated.

Sandy

Have a look at the databaseManager node in the method editor. There you find a foundSetUpdater (out of my head) that will probably solve your problem. Use “move code” (available if you right click on a function) to get an idea of how this works.

A loop is also possible: if you don’t have hundreds of thousands of records and use foundset.getRecord() to avoid a screen refresh for every record you touch, you will be amazed to see how fast you can process a decent amount of data.

Hope this helps a bit.

Hi Sandy,

Welcome to the world of Servoy.

A while back I did a flash movie that describes how to make font changes on any field or on all fields on a form. It also includes an explanation of how to do a Replace that is similar to the way it is done in FileMaker. The movie can be seen at:

http://www.servoymagazine.com/home/2005 … ont_2.html

Dean