Jump to content

Combining Fields in dbase


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

Recommended Posts

  • Newbies

Hi-

I'm trying to combine several fields. Currently, I don't have access to the server, so creating a calculation won't work. I thought I'd go through Scriptmaker, but I'm not sure how to accomplish it. Basically, I have contact info that needs to be gathered into one field that I can export and tab-separate. This is roughly what I have so far (bear with me; I tried to copy & paste, but it doesn't seem to have copied. Not sure where to put parentheses, etc.):

If resource field is empty resource field = company name & address & city..... you get the idea.

How would I do this?

Thanks!

T

FileMaker Version: 6

Platform: Mac OS X Jaguar

Link to comment
Share on other sites

Tlcano:

You can calculate within a Set Field command in a script, so...

If ["IsEmpty(ResourceField)"]

Set Field ["ResourceField","Company_Name & Address & City & ..."]

EndIf

-Stanley

Link to comment
Share on other sites

I'm trying to combine several fields. Currently, I don't have access to the server, so creating a calculation won't work. I thought I'd go through Scriptmaker, but I'm not sure how to accomplish it. Basically, I have contact info that needs to be gathered into one field that I can export and tab-separate. This is roughly what I have so far (bear with me; I tried to copy & paste, but it doesn't seem to have copied. Not sure where to put parentheses, etc.):

If resource field is empty resource field = company name & address & city..... you get the idea.

Actually, I'm not sure I get the idea. You have data that you want to combine so you can turn around and uncombine it. What is it that you really want to do? Where is all this data ending up and what is its purpose?
Link to comment
Share on other sites

  • Newbies

It's kind of complicated... the information will be going online, and will be accessed through a cgi search script which requires it to be tab-separated. For the past several years, I've been exporting the necessary records from their separate fields, but now the users want to be able to enter whatever text they need into those fields. The only solution they thought was acceptable was to create one field from which I could pull the data I needed. This means about 100 records or so this time. I was going to fill the field by hand, but thought that if a script could do it, it would be a huge help. I'd rather have them verify the information each time than have to enter all that data by hand every time they add a new customer.

I hope that makes ANY sense. smile.gif

T

Link to comment
Share on other sites

  • Newbies

Thanks so much for the calculation. It worked as written. One further problem, though... I can't figure out how to add tabs. Is there any way to do so? The script requires tab separations, and I don't think I can add them in my text editor. Any suggestions?

Thanks!

T

Link to comment
Share on other sites

If you really need it to be concatenated into one field, you could make a global field, g_Tab, copy a tab charactrer from wherever you can find one, and paste it into this global. Then set up the Set Field in your script to include this global.

"Company_Name & Address & City & ..."] becomes

"Company_Name & g_Tab & Address & g_Tab & City g_Tab & & ..."]

Steve Brown

Link to comment
Share on other sites

This topic is 6508 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
 Share

×
×
  • Create New...

Important Information

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