I have the following code:
IF COMPANYNAME := 'Company1' THEN
CHANGECOMPANY('Company2');
ELSE
CHANGECOMPANY('Company1');
I am getting the following error:
Please help!
*This post is locked for comments
I have the following code:
IF COMPANYNAME := 'Company1' THEN
CHANGECOMPANY('Company2');
ELSE
CHANGECOMPANY('Company1');
I am getting the following error:
Please help!
*This post is locked for comments
- Use = instead of :=
- IF and ELSE is a single statement so you don't need yo use ; after CHANGECOMPANY('Company2'), just use ; after CHANGECOMPANY('Company1')
Drop the : in the first line, and the ; in the second line.
IF COMPANYNAME = 'Company1' THEN
CHANGECOMPANY('Company2')
ELSE
CHANGECOMPANY('Company1');
I hope this helps. If this answers your question, please verify by clicking “Yes” next to “Did this answer your question?”
I dont think you can assign (:=) while using an IF statement. Rewrite the code as
IF COMPANYNAME='Company1' THEN...
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156