Skip to content
+1-888-319-3663

COMMUNITY FORUM

if then else

Deanne Rasmussen asked 5 years ago
current statement shows: 
 
If _PAYCODE = ‘300300’ then
Return false else 
Return true 
End if
 
Getting “error count: 2   Error in restriction:  Expression expected.  Error in restriction:  End of statement expected.”
 
WHY?????
Answers
Patrick Roth Staff answered 5 years ago
Couple things:
1. you have single quotes here which is great for SQL but less good for VB.  Use double quotes.
2. VB is expecting a certain structure of your statements – i’m not sure that it likes you having the “else” on the “return false” line.
should be:

return false
else
return true
patrick
Deanne Rasmussen replied 5 years ago

that was it Patrick!!! didn’t realize it’d be so sensitive


If you would like to submit an answer or comment, please sign in to the eOne portal.