September 28, 200520 yr Newbies hello everyone, i'm updating our database and i'd like to combine several fields into one field. we have several fields like "notes" "comments" etc. and i'd like all of the data of these fields to go into one field, and then delete the fields we no longer use. can someone let me know how to do this? maybe there's a script, or is it a built-in function of fmpro? i couldn't find anything like this in the help files. thanks very much in advance alexandra
September 28, 200520 yr Hi Alexandra, Since this is a one-time thing, you can use Replace Contents. Show All Records then place your cursor in Field 1. Back up first. To combine Field 1, Field 2 and Field 3 into Field 1, enter the following calculation in the Records > Replace Field Contents calc box (not while networked): TrimAll(Field 1 & " " & Field 2 & " " & Field 3 ; 0 ; 0 ) After verification that the fields have combined into Field 1, you can delete the other fields. Updated: I got sloppy. If any field is empty you would have an extra space so I corrected it by wrapping it with TrimAll(). In this way, empty fields are accounted for and you don't need an IsEmpty() test on the fields. LaRetta Edited September 28, 200520 yr by Guest
Create an account or sign in to comment