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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to add range in AOT for empty string or null

(0) ShareShare
ReportReport
Posted on by 709

Hello guys,

A newbie, if I have a View in my AOT that I want to add Range that only include field that it is empty. What I need to type in Range ?

The field itself is a string datatype.

Currently I put something like this but it seems not working:

pastedimage1606725596425v1.png

It's a Data entity view, btw

Thanks.

I have the same question (0)
  • Martin Dráb Profile Picture
    235,914 Most Valuable Professional on at
    RE: How to add range in AOT for empty string or null

    It should work for empty strings (null values are a different case).

    If I was you, I would look at T-SQL code defining the view (through SQL Server Management Studio) and debugged this code directly. When I knew how I wanted to change T-SQL, I would go back to AX and change the view definition.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at
    RE: How to add range in AOT for empty string or null

    Hi ShaqAX,

    You can use an advanced filter function and place value (SysQueryRangeUtil::valueEmptyString()) into value property.

  • WillWU Profile Picture
    22,359 on at
    RE: How to add range in AOT for empty string or null

    Hi ShaqAX,

    You could try to add range in the onInitializedEntityDataSource event.

    FormDatasource fb = _sender.dataSource();
    QueryBuildDataSource qbd= fb.query().dataSourceTable(tableNum(SalesTable));
    qbd.addRange(fieldNum(SalesTable, Stringfield)).value(queryValue(""));

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 764 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 619 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 603 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans