If(Discount = 0 ; "Customer" ; "Trade")
And be sure to specify the Category field if this is in a script or be sure that the cursor is in the category field if this is a manual replace field contents operation.
Radio Buttons is a OR function. Check boxes are a AND function. You have 3 possibilites, with a two state IF. There is no such thing as a Radio check box. I think this may be your problem.
Note, I assumed that will meant radio buttons with my suggested solution...
I thought I had done that one already as it is the most obvious. It worked - thanks
Thanks also, Jim, I meant radio buttons...But all solved now..
Following on from the first (solved) question, how would I go about a similar action when I have two normal fields.
Issue I have - Source field in my table. I have imported data from an excel spreadsheet that provides a number into this source field. Ihave another excel spreadsheet that has the numbers in one column and the Source name in the next., each row being a new source record.
How do i get FM to alter the imported source data (number) to a source name?
I have tried a few things (I have imported the source excel file as a new temp table in my FM Db) but mow stumped...
You don't actually have to use replace field contents for that. YOu could set up an auto-enter calculation on the field that replaces the number with the value's labeling text if you enable auto-enter options during import. That may not be feasible but is an alternative to replace field contents.
Replace field contents would be setup to work exactly as in your first case, though perhaps with a case funcition instead of If so that you can work with more than two possible values.
Make sure the field is defined as text since you are replacing numbers with text in this operation.
I think I will try the autoenter options first, as I dont fancy typing in 50 or so entries for a case calc! thx
Maybe you don't even need that. Couldn't you just import the source name column of data into this field and not use any auto-enter setting or replace field contents operation?
Not really - The number code that is on the customers table (imported table) is linked to the source table (imported table). It is the source table that has the names of the sources on it.
So at the moment a customer record will have e.g. 34 as the source field. the source table will have a record (now i have imported it into fm as a temp table) with a number 34 and a field for despcription which will have email as the data.
Acutally i am already half way doing an autoenter calc so it may not be too trciky 0 didnt realise I can copy/paste columns from excel into the calc in fm