I have a table called accounts
3 of my fields can return the following values:
Type Dealer/Retail
FreeShipping Yes (Optional)
PermanentLoaner Yes (Optional)
I wanted to capture the configuration of these three fields into a field.
I created a text field called AcctCommConfigCode
I then created a calculation field with the same name to store the result.
The result would return 1 of 8 possible configurations using following key:
Retail = R, Dealer =D, Free Shipping = FS, Permanent Loaner = PL
Possbile Configurations:
R, RFS, RPL, RFSPL, D, DFS, DPL, DFSPL
I Have tried various "if", "elseif" and"Switch" statements and am having trouble with multiple conditions.
In Filemaker I would have used a case statement with the "and" operater.
example:
Case(Type = "Retail, "R",
Type = "Dealer", "D",
Type = "Dealer" and FreeShipping ="FS","DFS",
Type = "Retail" and FreeShipping ="FS","RFS",
Type = "Retail and PermanentLoaner = "Yes", "RPL",
Type = "Dealer" and PermanentLoaner = "Yes","DPL",
Type = "Dealer" and PermanentLoaner = "Yes"and FreeShipping ="Yes","DFSPL",
Type = "Retail" and PermanentLoaner = "Yes"and FreeShipping ="Yes","RFSPL",
"",
How can I recreate this calculation field in servoy. If someone could suppy a small sample of logic, I would greatly appreciate it.
Thanks,
Erich