Link to home
Start Free TrialLog in
Avatar of unknown45
unknown45

asked on

Incorrect Data Type?

I have the following code in a button, when i click the button everything appears to work but i get the error "Incorrect data type for operator or @function: Number Expected", If i remove the @setfield commands i do not get this error, any suggestions?


@If(managercomments!="" & creditapproved!=0; @SetField( "creditcustmansig" ; @Left(@Name([CN]; @UserName); 50) ) & @SetField( "creditcustmanstatus" ; "APPROVED") & @Command([FileSave]) & @If(creditapproved>500;@MailSend("Carlos Socias";"";"";"Credit - Pricing Error";"";"I have approved the following credit, please review...";[IncludeDoclink]);@MailSend("Missy Irwin";"";"";"Credit - Pricing Error";"";"The following credit has been approved...";[IncludeDoclink]) & @MailSend("Joel Swank";"";"";"Credit - Pricing Error";"";"The following credit has been approved...";[IncludeDoclink]) & @MailSend("Arturo Lobao";"";"";"Credit - Pricing Error";"";"The following credit has been approved...";[IncludeDoclink]) & @MailSend("Kim Janowicz";"";"";"Credit - Pricing Error";"";"The following credit has been approved...";[IncludeDoclink]) & @MailSend(customerservicerep;"";"";"Credit - Pricing Error";"";"The following credit has been approved...";[IncludeDoclink]) & @MailSend(salesmanager;"";"";"Credit - Pricing Error";"";"The following credit has been approved...";[IncludeDoclink])) & @Command([FileCloseWindow]);@Prompt([Ok];"Required Fields";"Please Complete The Comments Section..."))
SOLUTION
Avatar of Bozzie4
Bozzie4
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of p_partha
p_partha

sorry a typo
@do(@SetField( "creditcustmansig" ; @Left(@Name([CN]; @UserName); 50) ) & @SetField( "creditcustmanstatus" ; "APPROVED") & @Command([FileSave]) )
Yeah, partha, but without the &'s of course :-)
@do(@SetField( "creditcustmansig" ; @Left(@Name([CN]; @UserName); 50) ) ; @SetField( "creditcustmanstatus" ; "APPROVED") ; @Command([FileSave]) )

Tom

Lot of typos.. :) thx tom for the correction..

Partha
Avatar of unknown45

ASKER

Thanks guys, once again you guys have shown your true experts!!
Tom
When i answered this question, i didn't see your first post at all, now when he has accepted your answer, i am seeing ur post on top of mine , pretty strange (probably some cluster issue :)

Partha

I doesn't really bother me, Partha, as long as I get some points, I'm happy :-)

cheers,

Tom