Skip to main content

Notifications

Community site session details

Community site session details

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

Multi select in dialog field

(0) ShareShare
ReportReport
Posted on by 150

I have a field in my dialog named "item id"

The input should be 112..115 from the dialog.

So that 112,113,114,115 are selected .

So how do I create the field to accept the format "112..115"?

Can you give me the code? I was told to use a query but how to use it to accept a range?

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,091 on at
    RE: Multi select in dialog field

    Hi PrachiGupta97,

    The range value should be passed as a parameter to the "value" method.

    queryRun.query().datasourceno(1).addrange(fieldnum(inventable,itemid)).value(SysQuery::range('item01', 'item10'))

    To be honest, using ranges for strings is a doubtable feature, or at least you need to be sure that the item number is properly numerated.

  • PrachiGupta97 Profile Picture
    150 on at
    RE: Multi select in dialog field

    Hi I am also getting an error when I used the blog.

    Error:the qualifier queryRun is not valid in this context. Use a variable of this type instead

    Same error is coming for queryRun.

    Also in the blog .. we are creating a range for date..

    I am already getting a range for the item id.

    So do i need to add

    queryRun.query().datasourceno(1).addrange(fieldnum(inventable,itemid)).value()+'..'?

  • PrachiGupta97 Profile Picture
    150 on at
    RE: Multi select in dialog field

    I already have another query for syslookupmultisect control. will the method initparmdefault effect my other query?

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,091 on at
    RE: Multi select in dialog field in ax2012

    Hi PrachiGupta97,

    Here is an example of how to create a query for RunBase dialogs.

    jkmsdax2012.wordpress.com/.../

    In your case, you can use InventTable as a root data source for the table and the user can add "112..115" by pressing "select" button on the dialog and putting filter to ItemId field.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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... 293,304 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans