I have a Ship-To area on a form where a user selects a company name from a dialog list, clicks on an action button and the remaining address information is loaded for them. This works great but I get the error message “Incorrect Data Type For Operator Or @Function: Number Expected”. The user can click OK and continue.
All of the fields involved here are text fields and don’t understand why it would be looking for a numeric value.
Any suggestions ? - Thanks!
Example of action button code used:
@If(ShipTo1= “Taco Bell”;
@SetField(“ShipTo2”;“6600 East Millford Road”) &
@SetField(“ShipTo3”;“Dock #8”) &
@SetField(“ShipTo4”;“New York, NY 48090”);
ShipTo1= “McDonalds”;
@SetField(“ShipTo2”;“2700 Edgemont Lane”) &
@SetField(“ShipTo3”;“Elk City, TX 60007”) &
@SetField(“ShipTo4”;“”);
“”)
Subject: Don’t Understand Why I Am Getting Error Msg
Maybe you have a default value for a field that is not text.
The fomula is missing something. It should be odd number of actions:
@If( condition1 ; action1 ; condition2 ; action2 ; else_action )
I don’t think you can use & for multiple action.
Try @do( action1 ; action2 ; )
Subject: Don’t Understand Why I Am Getting Error Msg
You cant use “&” in an @If like that.You need to use @Do
@If(ShipTo1= “Taco Bell”;
@Do(@SetField(“ShipTo2”;“6600 East Millford Road”);
@SetField(“ShipTo3”;“Dock #8”);
@SetField(“ShipTo4”;“New York, NY 48090”)); ShipTo1= “McDonalds”;
@Do(@SetField(“ShipTo2”;“2700 Edgemont Lane”);
@SetField(“ShipTo3”;“Elk City, TX 60007”);
@SetField(“ShipTo4”;“”));
“”);
Hughster Rooster
“When in doubt, always assume the Animal doesn’t enjoy being tortured.” - Ricky Gervais
Subject: RE: Don’t Understand Why I Am Getting Error Msg
Thanks guys. The @Do was what I needed instead of the & symbols. It works great.