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

Importing from Excel and converting fields--Newbie


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

Recommended Posts

  • Newbies
Posted

OK, I'm a newbie to FMP. I have a "database" in Excel I need to import to FMP and convert to numbers. For example, if the field in Excel is "Unemployed" I want that to be a "1" in FMP, if "Employed" in Excel, then "2" in FMP. No clue how to do that. Sorry for the total newbiness, and thanks for the help. confused.gif

Posted

Create a text field named "EmployTxt". Then create a calculation field, number result,

"Employ_c," =

Case ( EmployTxt = "Employed", 2,

EmployTxt = "Unemployed", 1)

I'm assuming those are the only 2 choices. It will have nothing if neither of those is true. There are other ways to make this a permanent change, using Replace, so you could toss the Txt field. But the above is the easiest.

Posted

Hi Susie,

Fenton has suggested a way to handle one example you gave, however, I have a feeling that there are going to be more. It may be helpful for you to attached a sample of your Excel database, and maybe we can give you some additional help or pointers.

Lee

cool.gif

  • Newbies
Posted

Thank you for the help, but I couldn't get your code to work, Fenton (probably because I'm not a developer). I think I'll probably have to use the backup plan of re-assigning the values in SPSS.

Posted

Well, you're developing, so you're a developer :-)

Attached is an example. Basically you just import your Excel column into the EmployTxt field. There is only 1 Excel column, right? Otherwise we'd need something a little different.

Employment.zip

Posted

actually, you can alos to the same calc in Excel, using almost the same syntax as in FileMaker, then import that column iknstead of the original.

This topic is 7361 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.