Skip to main content

Notifications

Community site session details

Community site session details

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

selected value of multi select lookup not displaying in form

(0) ShareShare
ReportReport
Posted on by 131

I have created multi select lookup. It is working fine but when I select value it does not display value on form. below is my screen shot 

multiselect3.png

here is my lookup code

public void lookup()
{
   Query query = new Query();
    QueryBuildDataSource queryBuildDataSource;
    QueryBuildRange queryBuildRange;
    SysTableLookup sysTableLookup;

    str   ItemCategoryCodeforlockup = RNI_Product.valueStr();
    if(ItemCategoryCodeforlockup)
    {
        queryBuildDataSource = query.addDataSource(tableNum(SL_ItemCatSubType));
        queryBuildDataSource.addRange(fieldNum(SL_ItemCatSubType,RNI_LINEOFPRODDESCRIPTION)).value(ItemCategoryCodeforlockup);
        msCtrl = SysLookupMultiSelectCtrl::constructWithQuery(this.formRun(),this,query);
    }
}

public boolean modified()
{
       boolean ret;
   
container c,v;
int i;
ret = super();

if (ret)
{
c = msCtrl.get();  // get RecIds of the selected rows
v = msCtrl.getSelectedFieldValues(); // get actual value of the selected rows

for (i = 1; i <= conLen(c);i  )
    {
    //info(conPeek(c,i));
    //info(conPeek(v,i));

    }
}

return ret;
}

  • Suggested answer
    Community member Profile Picture
    2 on at
    selected value of multi select lookup not displaying in form

    How to Create Multi Select Lookup in Microsoft Dynamics??

     
    Solutions For you ....
     
  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: selected value of multi select lookup not displaying in form

    This statement should be in the init method of the form so that you can initialize the SysLookupMultiSelectCtrl instance with the name of the control.

     msCtrl = SysLookupMultiSelectCtrl::constructWithQuery(this.formRun(),this,query);

    How does this form work? Are these selected values stored in a different table?

    It might be useful for you to look at a few examples of how these lookups can be achieved. Please check the following links -

    AX 2012 - Multiselect Lookup - Microsoft Dynamics AX Community

    Create Multi Select Lookup in AX 2012 | Stoneridge Software

  • Laraib Profile Picture
    131 on at
    RE: selected value of multi select lookup not displaying in form

    I would like to thank you for responding on my question

    No Gunjan, It does not display any value when I re-open form.

    Note: I have also edit my question and add code in my question on your request

  • Gunjan Bhattachayya Profile Picture
    35,421 on at
    RE: selected value of multi select lookup not displaying in form

    Hi Syed,

    Is it an issue only when you select the values? If you close the form and re-open it, can you see the values fine?

    It might be helpful if you share your code related to this multi-select lookup.

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!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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,998 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,850 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans