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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

X++ Like fixed variable

(0) ShareShare
ReportReport
Posted on by 576

Hello . 

str itemid = "11*";
InventTable inventTable;

select inventTable where inventTable .ItemId like itemid;

I got an error says 

Container and unbounded string fields are not allowed in a WHERE expression.

how i can use like with string variable 

Any help ?

Thanks

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,099 on at

    Hi Ahmed,

    You can't use unlimited strings in where clause. Use EDT instead of str type, like ItemId

    Itemid itemid = "11*";
    InventTable inventTable;
    
    select inventTable where inventTable.ItemId like itemid;

  • Ismail Mohamed Profile Picture
    576 on at

    Thanks

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 510 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 302 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans