web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

If statement on an enum in AL?

(0) ShareShare
ReportReport
Posted on by

I am trying to run an If statement in AL, and if I enter it:

IF "EFT Tender Type - CL-" = '' Then.... 
I get a message Operator '=' cannot be applied to operands of type 'Enum "EFT Tender Type -CL-"' and 'Text'. What is the best way to check if this field is blank or contains a certain value (Credit Card)?

Thanks,

Kevin

I have the same question (0)
  • kjjson Profile Picture
    on at
    RE: If statement on an enum in AL?

    That worked great. Thank you so much.

  • Verified answer
    Mohana Yadav Profile Picture
    60,604 Super User 2025 Season 2 on at
    RE: If statement on an enum in AL?

    Did you try

    IF "EFT Tender Type - CL-" = "EFT Tender Type - CL-"::"" Then....

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans