web
You’re offline. This is a read only version of the page.
close
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

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;
}

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    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.

  • Laraib Profile Picture
    131 on at

    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,423 on at

    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

  • Suggested answer
    Community member Profile Picture
    2 on at

    How to Create Multi Select Lookup in Microsoft Dynamics??

     
    Solutions For you ....
     

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans