Hello Friends, In this tutorial, We are going to learn about lightning:dualListbox widget in the lightning component. The lightning:dualListbox allows you to select one or more options from a list of available option. We will see how to use lightning:dualListbox in lightning component salesforce.

lightning:dualListbox in Lightning component.

lightning:dualListbox provides two side-by-side list box. The right side of list box contains the list of available options and left side of list box contains the list of selected options. The selected option can be move from the right side list box to the left side list box. We can also arrange the order of selected options.

The attribute of  LIGHTNING:DUALLISTBOX 

 

  • name (required): It specifies the name of the input element.
  • value: It specifies the value of the input element.
  • label (required): Label for dual list box component.
  • variant: It is used to show or hide the label of the component. Possible values are standard and label-hidden.
  • disabled: Specifies that the input element should be disabled or not. The default is false.
  • readonly: Set the read-only property of the input element. The default is false.
  • required: Set the required property of the input element. The default is false.
  • validity: Define the validity of the component with respect to validation parameters.
  • onchange: Action triggered on this event.
  • onfocus: Action triggered on this event.
  • onblur: Action triggered on this event.
  • sourceLabel: Label for the options list box.
  • options: List of options which are available for the selection.
  • requiredOptions: List of options which cannot be removed from selected options.
  • min: minimum number of that is required for selection.
  • max: maximum number of that can be selected.
  • values: List of the selected option.

In this example, I am going to show a list of skills from Position object.

Select Multiple values using lightning:dualListbox in Lightning Component Salesforce

Login to Your Salesforce account and open Developer Console.

Step 1 Create Apex Controller:

Create an apex class called MultiPicklistController that will return your multi picklist field value from the object. In my case its Skill__c from Position object. Here is the source code for Apex class.

Step 2 Create a Lightning Component

Now create a Lightning Component called MultiSelectComponent. 

MultiSelectcomponent.cmp:

MULTISELECTCOMPONENTController.js:

MULTISELECTCOMPONENTHelper.js:

Test the Lightning Component:

Call the Lightning component in a Lightning Application.

TestApp.app

Output:

lightning:dualListbox

View More:

Conclusion:

I hope you have enjoyed this session. Please don’t hesitate to comment for any technical help. Your feedback and suggestions would be appreciated,

Thank You.

174 Comments

  • I have observed that in the world the present moment, video games are classified as the latest fad with kids of all ages. Occasionally it may be extremely hard to drag your son or daughter away from the activities. If you want the best of both worlds, there are various educational games for kids. Interesting post.

  • Anonymous private proxies in addition to rapidly quickness proxy machines DreamProxies.com – Purchase proxies now!

  • Oh, lo entiendo, muchas gracias, pero por favor, ¿puede responderme a la última pregunta? ¿Es prudente alquilar 200 y extenderlos a 240 días y comprar un Golden o alquilar 250 y extenderlos a 240 días y ganar dinero (SI ES POSIBLE. ¿Puedo?) para el Golden.

  • No tanto tiempo, en realidad, Garry. Es como cualquier cosa nueva, cuanto más lo hagas, más rápido será (¡y mejor lo harás!).

  • I have heard the news that is already underway to collect signatures from dell’agguerrita papafrancisca member of the Church to accuse of heresy papa Clemente XV…

  • I simply want to say I am just newbie to blogging and definitely liked this website. More than likely I’m going to bookmark your site . You absolutely have exceptional writings. Regards for sharing with us your blog.

  • A different issue is that video gaming became one of the all-time greatest forms of recreation for people of all ages. Kids enjoy video games, and adults do, too. The particular XBox 360 is probably the favorite games systems for people who love to have hundreds of games available to them, and also who like to learn live with people all over the world. Many thanks for sharing your ideas.

  • Im no professional, but I think you just made the best point. You naturally comprehend what youre speaking about, and I can seriously get behind that. Thanks for staying so upfront and so truthful.

  • Spot on with this write-up, I truly feel this website needs much more attention. I’ll probably be returning to read through more, thanks for the info!

  • Greetings, I believe your site may be having web browser compatibility issues. Whenever I look at your website in Safari, it looks fine however, if opening in IE, it has some overlapping issues. I merely wanted to provide you with a quick heads up! Besides that, great site!

  • Can I simply just say what a comfort to discover someone who truly understands what they are talking about on the internet. You certainly know how to bring an issue to light and make it important. More people need to check this out and understand this side of the story. I was surprised that you are not more popular since you certainly have the gift.

  • Oh my goodness! Awesome article dude! Many thanks, However I am experiencing problems with your RSS. I don’t know why I am unable to subscribe to it. Is there anybody else getting the same RSS issues? Anybody who knows the answer can you kindly respond? Thanks!

  • Hello there! This blog post couldn’t be written much better! Looking through this article reminds me of my previous roommate! He always kept preaching about this. I’ll forward this post to him. Fairly certain he’s going to have a very good read. Many thanks for sharing!

  • Thanks for discussing your ideas. I would also like to convey that video games have been actually evolving. Today’s technology and revolutions have made it easier to create genuine and enjoyable games. All these entertainment video games were not really sensible when the concept was first of all being experimented with. Just like other designs of technological innovation, video games too have had to progress by many years. This itself is testimony towards fast progression of video games.

  • I blog quite often and I genuinely appreciate your information. Your article has truly peaked my interest. I am going to book mark your site and keep checking for new information about once a week. I subscribed to your RSS feed as well.

  • Howdy! I just want to offer you a big thumbs up for your great information you have got here on this post. I’ll be coming back to your site for more soon.

  • Way cool! Some extremely valid points! I appreciate you writing this article and also the rest of the website is also really good.

  • I’m amazed, I have to admit. Rarely do I come across a blog that’s both equally educative and engaging, and without a doubt, you have hit the nail on the head. The problem is something that too few people are speaking intelligently about. I am very happy that I found this during my hunt for something regarding this.

  • There is definately a great deal to know about this issue. I love all of the points you’ve made.

  • Sapid Agency is a Search Engine Optimization company in New York City that provides SEO Services. Their proprietary SEO strategies help struggling websites and aspiring business owners to rank their websites higher in multiple search engines like Google , Yahoo and Bing. They provide local and gmb map ranking for businesses in NYC and many other local areas. Find more at https://www.sapidagency.com/ @ 145 E 57TH NEW YORK, NY 10022, USA, +1 971 341 5608 USA

  • I truly love your blog.. Great colors & theme. Did you make this amazing site yourself? Please reply back as I’m attempting to create my own personal site and want to find out where you got this from or what the theme is called. Kudos!

  • Can I simply say what a comfort to find someone that truly understands what they’re talking about on the web. You definitely know how to bring an issue to light and make it important. A lot more people must read this and understand this side of the story. I was surprised that you’re not more popular since you definitely have the gift.

  • You ought to be a part of a contest for one of the finest websites on the web. I’m going to recommend this blog!

  • Hello there, I do believe your web site may be having internet browser compatibility problems. When I look at your website in Safari, it looks fine however, if opening in Internet Explorer, it has some overlapping issues. I simply wanted to give you a quick heads up! Besides that, great website!

  • Oh my goodness! Awesome article dude! Thank you, However I am experiencing troubles with your RSS. I don’t understand why I can’t subscribe to it. Is there anybody else having identical RSS issues? Anybody who knows the answer can you kindly respond? Thanx.

  • Nice post. I learn something new and challenging on sites I stumbleupon everyday. It will always be exciting to read through content from other writers and practice a little something from their web sites.

  • Знаете ли вы?
    Залётная птаха занесена в перечень птиц России спустя более полувека после открытия вида.
    Сын политика-пьяницы помог принять сухой закон в своей провинции.
    Копенгагенский собор пришлось выстроить заново после визита англичан в 1807 году.
    Иногда для поддержки экономики деньги «разбрасывают с вертолёта».
    Издательство «Шиповник» было задумано для публикации сатиры, однако вместо неё печатало Лагерлёф, Бунина и Джерома Джерома.

    arbeca

  • I think this internet site has some rattling great information for everyone. “To be able to be caught up into the world of thought — that is being educated.” by Edith Hamilton.

  • You could certainly see your expertise within the paintings you write. The sector hopes for even more passionate writers like you who aren’t afraid to mention how they believe. Always go after your heart. “History is the version of past events that people have decided to agree upon.” by Napoleon.

  • I have to thank you for the efforts you’ve put in writing this blog. I am hoping to view the same high-grade blog posts by you later on as well. In fact, your creative writing abilities has motivated me to get my very own website now 😉

  • Oh my goodness! Impressive article dude! Thank you, However I am encountering difficulties with your RSS. I don’t know why I can’t join it. Is there anybody else having similar RSS issues? Anybody who knows the answer can you kindly respond? Thanks.

  • Hi, I do think this is a great site. I stumbledupon it 😉 I may come back once again since I book marked it. Money and freedom is the greatest way to change, may you be rich and continue to guide others.

  • of course like your web-site however you have to take a look at the spelling on quite a few of your posts. A number of them are rife with spelling issues and I in finding it very troublesome to tell the truth on the other hand I’ll certainly come again again.

  • Excellent site you’ve got here.. It’s difficult to find quality writing like yours these days. I seriously appreciate people like you! Take care!!

  • Hi! I could have sworn I’ve visited this site before but after looking at a few of the posts I realized it’s new to me. Nonetheless, I’m certainly pleased I came across it and I’ll be bookmarking it and checking back regularly!

  • hello!,I really like your writing so much! percentage we keep up a correspondence extra approximately your article on AOL? I need a specialist in this house to solve my problem. May be that’s you! Looking ahead to look you.

  • It’s perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I want to suggest you few interesting things or advice. Perhaps you could write next articles referring to this article. I desire to read more things about it!

  • I blog frequently and I truly appreciate your content. Your article has really peaked my interest. I am going to book mark your blog and keep checking for new details about once per week. I subscribed to your RSS feed too.

  • Greetings, I do believe your website might be having internet browser compatibility problems. When I look at your site in Safari, it looks fine but when opening in IE, it has some overlapping issues. I merely wanted to give you a quick heads up! Aside from that, great blog!

  • The very next time I read a blog, Hopefully it won’t fail me just as much as this one. I mean, Yes, it was my choice to read through, nonetheless I genuinely believed you would have something interesting to say. All I hear is a bunch of crying about something you could possibly fix if you were not too busy seeking attention.

  • It can be nearly impossible to see well-educated individuals on this niche, unfortunately you seem like you fully understand those things you’re covering! Regards

  • I simply desire to inform you you that I am new to blogging and pretty much liked your work. Quite possibly I am prone to save your blog post . You truly have lovely article content. Love it for giving out with us your current website write-up

  • Sapid Agency is a Search Engine Optimization company in New York City that provides SEO Services. Their proprietary SEO strategies help struggling websites and aspiring business owners to rank their websites higher in multiple search engines like Google , Yahoo and Bing. They provide local and gmb map ranking for businesses in NYC and many other local areas. Find more at https://www.sapidagency.com/ @ 145 E 57TH NEW YORK, NY 10022, USA, +1 971 341 5608 USA

  • You ought to take part in a contest for one of the best blogs online. I will highly recommend this web site!

  • Howdy there, just started to be aware of your webpage through Search engines like google, and have found that it is truly helpful. I will like should you decide persist this informative article.

  • This site was… how do I say it? Relevant!! Finally I have found something that helped me. Thanks.

  • Having read this I believed it was very informative. I appreciate you taking the time and effort to put this short article together. I once again find myself personally spending way too much time both reading and posting comments. But so what, it was still worthwhile.

  • MetroClick specializes in building completely interactive products like Photo Booth for rental or sale, Touch Screen Kiosks, Large Touch Screen Displays , Monitors, Digital Signages and experiences. With our own hardware production facility and in-house software development teams, we are able to achieve the highest level of customization and versatility for Photo Booths, Touch Screen Kiosks, Touch Screen Monitors and Digital Signage. Visit MetroClick in NYC at http://www.metroclick.com/ or , 121 Varick St, New York, NY 10013, +1 646-843-0888.

  • It’s actually nearly impossible to encounter well-educated women and men on this niche, then again you appear like you understand which you’re writing about! Bless You

  • I merely intend to tell you that I am new to blogging and totally loved your report. Very likely I am likely to save your blog post . You definitely have fantastic article information. Be Grateful For it for sharing with us your site page

  • You’ll find it almost close to impossible to see well-updated parties on this matter, however, you look like you comprehend which you’re indicating! Excellent

  • Greetings here, just became mindful of your post through The Big G, and have found that it’s genuinely informational. I will appreciate if you decide to keep up this informative article.

  • I discovered your blog site on google and examine a few of your early blog posts. Remain to maintain the very good run. I simply additional up your RSS feed to my MSN News Viewers. Looking for forward to learning more from you later!?

  • Oh my goodness! Amazing article dude! Many thanks, However I am going through issues with your RSS. I don’t understand the reason why I am unable to join it. Is there anybody getting the same RSS issues? Anyone who knows the answer will you kindly respond? Thanks!!|

  • Youre so trendy! I don’t suppose Ive read anything such as this before. So nice to locate somebody with some initial ideas on this subject. realy thank you for starting this up. this site is something that is needed on the internet, somebody with a little creativity. helpful job for bringing something brand-new to the net!

  • The next time I check out a blog site, I hope that it doesn’t dissatisfy me as long as this set. I suggest, I recognize it was my choice to read, however I actually thought youd have something intriguing to state. All I hear is a lot of yawping about something that you could fix if you werent also busy seeking focus.

  • An interesting conversation deserves remark. I assume that you need to create a lot more on this subject, it may not be a frowned on subject but normally individuals are not enough to speak on such subjects. To the next. Thanks

  • It’s appropriate time to make some plans for the future and it’s time to be happy. I’ve read this post and if I could I wish to suggest you few interesting things or advice. Perhaps you could write next articles referring to this article. I want to read more things about it!|

  • Hello there! I just want to provide a substantial thumbs up for the excellent info you have here on this blog post. I will be returning to your blog for more soon.

  • Hi there, yup this paragraph is actually nice and I have learned lot of things from it regarding blogging. thanks.|

  • When I initially commented I clicked the -Notify me when brand-new remarks are added- checkbox as well as now each time a comment is included I obtain 4 e-mails with the exact same remark. Is there any way you can remove me from that solution? Many thanks!

  • Aw, this was an actually great article. In idea I would like to put in composing like this additionally? taking time and actual effort to make a great post? yet what can I claim? I hesitate alot as well as by no means appear to get something done.

  • Great article. I find out something much more difficult on various blogs everyday. It will certainly always be promoting to read material from various other writers and practice a something from their store. I?d favor to utilize some with the material on my blog whether you don?t mind. Natually I?ll offer you a web link on your web blog. Thanks for sharing.

  • I really hope to show you that I am new to posting and absolutely enjoyed your site. Probably I am prone to store your blog post . You indeed have impressive article content. Acknowledge it for sharing with us your very own blog webpage

  • Howdy there, just turned aware about your wordpress bog through Search engines like google, and discovered that it’s truly interesting. I’ll appreciate if you persist this approach.

  • Thanks for any other informative blog. Where else may just I am getting that type of info written in such a perfect means? I’ve a challenge that I’m just now running on, and I’ve been on the glance out for such information.|

  • This website is truly a walk-through for every one of the info you desired concerning this as well as didn?t recognize that to ask. Glimpse right here, and you?ll most definitely discover it.

  • It?s hard to find experienced individuals on this subject, however you seem like you know what you?re talking about! Thanks

  • Wonderful blog! I found it while browsing on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Appreciate it|

  • you are in point of fact a excellent webmaster. The web site loading pace is incredible. It seems that you are doing any unique trick. Also, The contents are masterpiece. you’ve done a magnificent task in this subject!|

  • Good day! This is kind of off topic but I need some advice from an established blog. Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about making my own but I’m not sure where to begin. Do you have any points or suggestions? With thanks|

  • It?s tough to locate experienced people on this subject, however you seem like you know what you?re speaking about! Thanks

  • When I originally commented I clicked the -Notify me when brand-new comments are added- checkbox and currently each time a remark is included I obtain 4 emails with the exact same remark. Exists any way you can remove me from that solution? Thanks!

  • Hello to all, as I am really keen of reading this blog’s post to be updated regularly. It consists of pleasant data.|

  • An excellent share, I simply given this onto a coworker who was doing a little analysis on this. As well as he as a matter of fact acquired me breakfast since I located it for him. smile. So let me rephrase that: Thnx for the treat! Yet yeah Thnkx for investing the time to discuss this, I really feel strongly concerning it and also enjoy learning more on this topic. Ideally, as you come to be competence, would certainly you mind upgrading your blog site with even more information? It is highly helpful for me. Large thumb up for this article!

  • A remarkable share, I simply offered this onto an associate who was doing a little analysis on this. And also he in fact acquired me morning meal due to the fact that I found it for him. smile. So let me rephrase that: Thnx for the reward! Yet yeah Thnkx for investing the time to review this, I feel strongly concerning it as well as love learning more on this subject. If possible, as you end up being expertise, would you mind upgrading your blog with more information? It is extremely helpful for me. Large thumb up for this post!

  • Thank you a lot for sharing this with all folks you actually recognise what you are talking about! Bookmarked. Please additionally discuss with my website =). We could have a hyperlink change contract among us|

  • I think that everything published made a ton of sense. But, think about this, what if you were to write a killer title? I ain’t saying your information is not solid, but suppose you added a headline that grabbed people’s attention? I mean BLOG_TITLE is kinda plain. You should glance at Yahoo’s front page and note how they create article titles to grab viewers interested. You might add a related video or a pic or two to get readers interested about everything’ve written. Just my opinion, it would bring your blog a little livelier.|

  • An intriguing conversation is worth remark. I assume that you must compose much more on this subject, it may not be a taboo topic but typically individuals are insufficient to talk on such topics. To the next. Cheers

  • I just want to tell you that I’m very new to blogs and actually loved this website. Almost certainly I’m planning to bookmark your blog . You certainly have good posts. Regards for sharing with us your website page.

  • I was very happy to locate this web-site. I wished to thanks for your time for this terrific read!! I absolutely enjoying every little of it and also I have you bookmarked to take a look at brand-new things you blog post.

  • Hi there! This is kind of off topic but I need some advice from an established blog. Is it very difficult to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about making my own but I’m not sure where to start. Do you have any tips or suggestions? Many thanks|

  • Hi! I simply want to give a significant thumbs up for the wonderful information you have here on this article. I will be coming back to your blog site for even more quickly.

  • An impressive share, I simply provided this onto a coworker who was doing a little evaluation on this. And he as a matter of fact bought me morning meal because I discovered it for him. smile. So let me rephrase that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I really feel strongly concerning it as well as love finding out more on this topic. Preferably, as you end up being expertise, would you mind updating your blog with more information? It is extremely practical for me. Large thumb up for this post!

  • hello there and thank you for your information – I’ve definitely picked up something new from right here. I did however expertise several technical issues using this site, since I experienced to reload the website many times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and could damage your high-quality score if ads and marketing with Adwords. Anyway I am adding this RSS to my e-mail and can look out for a lot more of your respective exciting content. Make sure you update this again very soon.|

  • You made some respectable points there. I searched the web for the issue and also located most individuals will certainly support with your site.

  • The following time I review a blog, I hope that it does not disappoint me as high as this. I suggest, I recognize it was my selection to review, yet I really believed youd have something interesting to claim. All I hear is a number of whining concerning something that you could take care of if you werent as well busy trying to find focus.

  • Hello there! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.|

  • I simply want to tell you that I am just all new to blogs and certainly savored you’re blog. Likely I’m going to bookmark your website . You actually come with awesome article content. Bless you for sharing your web page.

  • Have you ever considered about including a little bit more than just your articles? I mean, what you say is important and everything. But think of if you added some great images or videos to give your posts more, “pop”! Your content is excellent but with images and video clips, this blog could undeniably be one of the very best in its niche. Very good blog!|