Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6996 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted (edited)

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. :wink2:

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 by Guest

This topic is 6996 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.