Database Solutions - Hints & Tips

Tip 01:
current tip | tips archive

previous tip | next tip

Search and Replace

Have you ever wanted to do ‘search and replace’ within a trigger in UNIFACE?

Yes, you can do ‘Find’. But what about ‘Replace’.

Do you feel lucky?

Find Button Exit Button

tip01_img1.gif (26758 bytes)

From within a trigger where there is more than one line of code

Press the FIND key combination (Press F11, or Gold Gold [,]) and enter the word you would like to find followed by the word you want to replace it with, delimited by a ‘?’. E.g to replace the word if with the word maybe, enter : ?if?maybe?

2. Press the find button on the panel.

Exit the Find form using the panel exit button.

Press FIND NEXT key combination (F12 or Gold [,])

This will automatically replace all occurrences of the specified text with the changed text. Once you have done one substitution, it would appear that you can just enter your next combination, e.g ?Hello?Goodbye? followed by pressing the Find button and the replace is automatically performed.

This has been tested in UNIFACE 6.1.dt and 7.2.02

Disclaimer:

This is an undocumented feature. Use with caution. Try it out somewhere safe (e.g. in a newly created form)

compuware_01.gif (3977 bytes)


Copyright ©2000 OCS Consulting plc

dbs_block_logo.gif (2150 bytes)
Refresh Frames