// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! This script is provided "as is" by Applied Maths. ! // ! You are free to use and modify this script for your own needs. ! // ! Redistribution or reproduction of the script is prohibited. ! // ! DISCLAIMER: ! // ! Improper use of scripts may corrupt your database. ! // ! Running this script is entirely at your own responsibility. ! // ! Applied Maths accepts no lialibility for any consequences ! // ! resulting from its use. ! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DIALOG dlg; string fieldlist,field,st,st2; integer i,firstonly,ok; for i=1 to DbGetFieldCount do fieldlist=fieldlist+DbGetFieldName(i)+" "; DlgAddText(dlg,"Select the field you want to convert",15,15,150,30); DlgAddList(dlg,fieldlist,field,15,55,150,150,"LIST"); DlgAddCheck(dlg,"First character only",firstonly,15,210,120,15); while field="" do { if not(DlgShow(dlg,"Convert field to upper case",240,310)) then stop; if field="" then message("You must select a field!"); } for i=1 to DbGetEntryCount do { if i/200=floor(i/200) then setbusy("Scanning database - "+str(i,0,0)); st=DbGetField(DbGetEntryKey(i),field); if firstonly then { st2=substring(st,1,1);upcase(st2); st=st2+substring(st,2,9999); } if not(firstonly) then upcase(st); DbSetField(DbGetEntryKey(i),field,st); } setbusy(""); DbSaveFields;