Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

want to store multiselect lookup values in the table

(1) ShareShare
ReportReport
Posted on by 36
Hi All,
 
 
I have a muiltiselect lookup control in form....Here i want to store these values in the table level...how we will do this...please guide me (I am new to this concept)
 
 
 
Thanks,
Prasad N.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,759 Super User 2024 Season 2 on at
    want to store multiselect lookup values in the table
    Hi Prasad,


    There are three links that I found that might be helpful achieving your requirement.

    Dynamics 365 F&O Solutions: Multi select lookup in D365 FO (dax365.blogspot.com)
     
     
    You can try to understand the example on the LogisticsPostalAddress form. If you go to this form in the AOT open the design and view coding, you can learn how to do it. There is a multi-select for address roles.
     
    The name of the form control for the lookup is Roles. The auto-declaration property for this control is set to yes.
     
    Then open the coding and check where Roles is used. It will be used in a method where the control will be linked to a variable named RolesCtrl, defined as a SysLookupMultiSelectCtrl.
     
    Check all the coding where Roles, RolesCtrl, and SysLookupMultiSelectCtrl is used. You will find out how the control should be linked to a multi-select control class, but you will also come across a method where the control will be filled with all selected items using a container variable.

    I do hope this will give you some learning and the option to implement it yourself.
     
  • PN-21051232-0 Profile Picture
    PN-21051232-0 36 on at
    want to store multiselect lookup values in the table
    Hi Andre,
     
    I am new to Dynamics Ax...can you please post the code for storing the multi select lookup values in the table.
     
     
    Thanks,
    Prasad N.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,759 Super User 2024 Season 2 on at
    want to store multiselect lookup values in the table
    Hi Prasad,
     
    For storing the details, you got a hint in an earlier reply. You can have a look at similar functionality for address purposes and address books on parties. Let us know if you aren't able to do some reverse engineering to find out what needs to be done.
    For the new question (filtering), as requested, please create a new question as filtering lookups and storing the outcome of a multi-select are two different topics.  
  • PN-21051232-0 Profile Picture
    PN-21051232-0 36 on at
    want to store multiselect lookup values in the table
    Hi Andre,
     
    First i need the solution for below ...
     
    I want to filter the multi select lookup control(with columns from purchline-itemid,linenumber) based on other lookup field(normal relation to purchtable on purchid) selection and ...the resultant values needs to show in the form grid.. can you please help me with code if you have...i was trying to complete it but i did not get any relevant suggestions..
     
    Please suggest me a solution
     
     
    Thanks,
    prasad N.
     
     
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,759 Super User 2024 Season 2 on at
    want to store multiselect lookup values in the table
    Hi Prasad,
     
    You are confusing me. The question is about storing multi-select values in a table, now you change the topic to filter the multi-select lookup. Has your original question been answered? Please create a new post for a new question.
  • PN-21051232-0 Profile Picture
    PN-21051232-0 36 on at
    want to store multiselect lookup values in the table
    Hi Andre,
     
    I want to filter the multi select lookup control based on other lookup field selection and ...the resultant values needs to show in the form grid.. can you please help me with code if you have...i was trying to complete it but i did not get any relevant suggestions..
     
     
    Thanks,
    Prasad N.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,759 Super User 2024 Season 2 on at
    want to store multiselect lookup values in the table
    Hi Prasad,
     
    You don't need another datasource on the form, but you would need another table in your project. Have a look at the Address book multi select in the application as example. You can link multiple address books to a global address book record (Party). The parties are stored in the DirPartyTable. The multi-select lookup shows information from the table AddressBook. The multi-selected values are then stored in another table having reference fields to both tables: AddressBookParty.
     
  • PN-21051232-0 Profile Picture
    PN-21051232-0 36 on at
    want to store multiselect lookup values in the table
    Hi Martin,
     
    Thanks for the reply...
     
    I want to store only string control values (which is bound to datasource ) in the Table i am using in the form...My form having only one datasource.
     
     
     
    Thanks,
    Prasad N.
  • Martin Dráb Profile Picture
    Martin Dráb 230,468 Most Valuable Professional on at
    want to store multiselect lookup values in the table
    If you have one record and you want to store a list of several values related to this record, you need two tables in 1:N relation. The table storing the list need a reference to the other table (its primary key) and a field to store the value.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans