AnsweredAssumed Answered

FMP 12 Calculation Help

Question asked by StevenTempelman on Aug 9, 2012
Latest reply on Aug 10, 2012 by StevenTempelman


FMP 12 Calculation Help




I am stumped. I have a value list of accommodation types that has 14 different text values - for example "Hostel" "Lodge" "Resort" etc. that I use in the field "accommodation type"

Now, I am going to be doing regular exports from this database but need to have this field exported as a numeric value - for example "Hostel" would be type id 1 and I need to have a field - call it "typed" that would have the numeral 1 in it if that particular entry had Hostel as the accommodation type the numeral 2 for Lodge, numeral 3 for resort, etc. 

I can think of a sloppy way of doing this by setting up 15 new calculation fields. 1 field for each of the accommodation types. For example field 1 would be "if accomtype = hostel then put numeral 1 in field 1 else leave it blank" and for field 2 "if accomtype = lodge then put numeral 2 in field 2 else leave it blank" and so no and field 15 would just have "field 1 & field 2 & field 3" etc. with the result that field 15 would contain the accommodation type's numeric code, there has got to be a better/cleaner way to do this.