Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to filter the multiselect the item number

(0) ShareShare
ReportReport
Posted on by 5

pastedimage1582097041241v2.pngpastedimage1582097104409v3.png

  • qianwang Profile Picture
    qianwang 7,153 on at
    RE: How to filter the multiselect the item number

    Hi Satendra,

    More information:

    You can use Global::strSplit(str _stringToSplit, str _delimiters) to split string(values in the grid) into a list.

    And override the executeQuery() method by the following codes:

    List list  =global::strSplit(str _stringToSplit, str _delimiters);

    ListIterator   iterator;

    iterator = new ListIterator(list);

       while(iterator.more())

       {   this.query().datasourceTable(tableNum(yourtable)).addrange(fieldnum(yourTable,YourField)).value('iterator.value();');

           iterator.next();

       }

    Hope this helps.

    Regards,

    QianQW

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: How to filter the multiselect the item number

    Hi Satendra,

    1. Override modifiedField for combobox and run Table_ds.executeQuery() after super (In you case table_ds should be replaced with your data source)

    2. Override executeQuery for data source form point 1

    3. Before super convert value from combobox to container and back to a string separated by comma (Check the first message). Apply range to the needed field in the data source

    And check also form LogisticsPostalAddressLookup it has simial approach for roleTypes (key methods: Init, LogisticsLocationMain.executeQuery)

  • RE: How to filter the multiselect the item number

    Hi,

    I got these values but i don't understand the howto filter records by these values in the grid.

  • qianwang Profile Picture
    qianwang 7,153 on at
    RE: How to filter the multiselect the item number

    Hi Satendra,

    Do you want to achieve that you can select multiple items in the lookup control?

    Have a look at this class SysLookupMultiSelectCtrl, which will serve multi selection in the grid lookup control.

    Refer to the following blog:

    dynamicsaxtechstuff.wordpress.com/.../

    Regards,

    QianQW

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: How to filter the multiselect the item number

    Hi Satendra,

    If I understand you correctly you want to select multiple records in Combobox and filter records by this value in the grid.

    You can use strsplit or str2con to split value from combobox to a certain value and then add ranges for each value separately.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans