AnsweredAssumed Answered

Calculation fields: how to decode a code

Question asked by stevet59 on Jan 12, 2018
Latest reply on Jan 23, 2018 by stevet59



I wonder if someone could point me in the right direction for the following please?


I’m looking to import a single-letter data code into FMP and have it decoded in another field automatically.


The codes are along these lines:


O = Order

D = Delivered

R = Returned

X = Cancelled etc


My original thinking was to set up a Calculation field using an IF command along these lines: If(Status code)="O";"Order" and then a sequence of variables covering codes D, R, X and so on.


This doesn’t seem to work as the IF calculation appears to need two outcomes. Plus I can’t work out how to command the calculation to move on to the next code if the one doesn’t apply. Perhaps an OR function or similar would be needed.


A pop-up would work if all of the data was being created in FMP. But as it's being imported from an external source, this doesn't seem to be the right solution.


I've also looked at other options like Get, but again this doesn't seem to work.


Any help would be much appreciated.