Skip to main content



No record found.

Microsoft Dynamics AX forum

X++ Like fixed variable

Posted on by 570

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 ?


  • Ismail Mohamed Profile Picture
    Ismail Mohamed 570 on at
    RE: X++ Like fixed variable


  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,083 on at
    RE: X++ Like fixed variable

    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;

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans