Using a text editor to modify DB/TextWorks forms and query screens

by Kathy Bryce Monday, July 05, 2010 10:52 PM

If you ever need to change multiple Inmagic DB/TextWorks forms or query screens, this is a useful little trick.  For example, say you want to change a field label for a box and it has been used on multiple forms. Use Maintain > Manage Textbase Elements to select all the affected forms or query screens and click on Export.  The resulting .xpf can be opened in a text editor like Notepad or Notepad ++ and carefully modified.  The parameters for each form and for each box etc. on each form are included in this file. For example, you  could replace a box label, by searching the text file for “label=Subject Headings” and replacing with “label=Subjects”.

[13] box_type=R obj_type=F class_type=Q
    anchor=L abox=12 left=5 top=5 width=732 min=0 max=5 tab_order=13 tab_skip=2
    label=Subject Headings
    border scrollbar show_label label_loc=T label_font=8 bkg_color=14613758
  (1) item_field=Subject Headings
    item_font=5

We always recommend including the parameter such as label= as well as the actual text to be sure you are replacing exactly what you intend. In the example above the words “Subject Headings” are also used to indicate the field to be searched.  Once you have finished editing the forms, save the .xpf file under a different name, and use Maintain > Manage Textbase Elements to re-import the forms.  You can either delete the existing forms first as long as you still have the backup, or just go ahead and import the forms which will then be named formname_1.  You can then check the modification worked as expected before deleting each old form and renaming each revised one to remove the _1.

This trick works to globally change a whole range of parameters such as box background colors, or the file paths to servers embedded in web forms etc.   Contact us if you need training or any other assistance with forms design.

blog comments powered by Disqus

Month List