web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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,429 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,429 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
    HP-27040930-0 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 676

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 633 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 624 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans