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, ...
Answered

Default Dimension Multiselection lookup

(1) ShareShare
ReportReport
Posted on by 152
i have a requirement of  creating multiselection lookup for a SSRS report, i have idea to create single selection lookup but cant find anything on multiselection lookup
Categories:
I have the same question (0)
  • Ramesh Kumar Profile Picture
    7,527 Super User 2025 Season 2 on at
    Creating a multi-selection lookup for an SSRS report isn't a built-in feature, but it can be achieved with some custom logic and manipulation. Use a Multi-Select Parameter
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    Multi-selection lookup in report dialogs is supported out of the box (implemented in SysOperationAutomaticUIBuilder.addCollectionDialogField()). What you need to do is creating a data member (in your data contract class) that accepts and returns a collection (typically List) and is decorated with DataMemberAttribute or AifCollectionTypeAttribute.
     
    I'm not sure what you want to do about default dimensions, though.
  • SachinMittal Profile Picture
    152 on at
    this code is working fine to show dimension values but i needs description as well, there is display methid in dimensuionattribute value to get name but cant be used in query
     
    public void DivisionLookup()
        {
            Query                   query                   = new Query();
            DimensionAttribute      dimensionAttribute      = DimensionAttribute::findByName('BusinessUnit');
            query.addDataSource(tablenum(DimensionAttributeValue)).addRange(fieldNum(DimensionAttributeValue,DimensionAttribute)).value(queryValue(dimensionAttribute.RecId));
            QueryBuildDataSource    qbds    =  query.addDataSource(tablenum(DimensionAttributeValue));
            qbds.addRange(fieldNum(DimensionAttributeValue,DimensionAttribute)).value(queryValue(dimensionAttribute.RecId));
            qbds.addSelectionField(fieldNum(DimensionAttributeValue, DisplayValue )); //needed for field display in lookup
            container selectedFields = [tableNum(DimensionAttributeValue), fieldNum(DimensionAttributeValue, DisplayValue)];
       
        SysLookupMultiSelectCtrl::constructWithQuery(this.dialog().dialogForm().formRun(), DivisionDialogField.control(), query, false, selectedFields);
        }
     
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    You seem to be saying that this thread is resolved: you know how to create a multi-selection lookup for dimension values. Now you have a different question, therefore please create a new thread for it.
     
    By the way, I found a bug in your code: you added the data source (DimensionAttributeValue) twice. This is the fixed code (and made easier to read):
    public void divisionLookup()
    {
        DimensionAttribute dimensionAttribute = DimensionAttribute::findByName('BusinessUnit');
        
        Query query = new Query();
        QueryBuildDataSource qbds = query.addDataSource(tableNum(DimensionAttributeValue));
        qbds.addRange(fieldNum(DimensionAttributeValue, DimensionAttribute))
            .value(queryValue(dimensionAttribute.RecId));
        // Needed for field display in lookup
        qbds.addSelectionField(fieldNum(DimensionAttributeValue, DisplayValue));
        
        container selectedFields = [tableNum(DimensionAttributeValue),
                                   fieldNum(DimensionAttributeValue, DisplayValue)];
    
        SysLookupMultiSelectCtrl::constructWithQuery(
            this.dialog().dialogForm().formRun(), 
            DivisionDialogField.control(),
            query,
            false,
            selectedFields);
    }
     

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 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans