156
Views
7
Comments
[Dual List Box] Duplicate component
Question
dual-list-box
Web icon
Forge asset by João Melo
2023-02-10 19-42-59
João Melo
 
MVP

No, it is not!

Dual List Box is more lightweight as it uses ONLY jQuery, running in the browser. So no overload of requests to the server.

Sure our community users will have the oportunity to chose which one fits better their needs. ;)


UserImage.jpg
Hugo Nobre

João, I've tried your component and I have couple of questions for you.

When I open my Form I have ListBox1 with (all countries) and ListBox2 with (Portugal and Spain selected). When I click OK, it saves the ListBox2 records (CountryId) into the Database. So far so good. 


The "problem" is when I open the same form for Editing and I want to show on ListBox 2 the countries that were previously saved and on ListBox1 all the countries but the ones saved to the database.

Of course If I want to open the same form for a new Record, the ListBox1 must show all the countries and ListBox 2 must be empty.

Can you help me out on how do I achieve this?


2023-02-10 19-42-59
João Melo
 
MVP

Hi Hugo. Note that you need to do 2 queries to the database. One for each Listbox. To do so, simply grab the records for the ListBox 1 that are not in the Listbox 2. You can use an advanced query with a NOT EXISTS clause.

2018-04-14 14-26-47
Rui Correa

Dear João i have the same issue as Hugo. The problem is when i want an "edit mode".

When i move an item from the ListBox1 to ListBox2 and click save, the items moved are not save in the ListBox2. Both list are exact the same of the original query.  

Is there a way to achieve this ?

Can you help me to achieve this ?

Thank you!!!

2023-02-10 19-42-59
João Melo
 
MVP

Hi Rui, take a look at the Sample App available here: https://www.outsystems.com/forge/Component_Overview.aspx?ProjectId=3343

Try to figure out if there is any difference in your implementation.

I'll be happy to help you out if you find any other issue.

UserImage.jpg
James Vaughan

I like how this component functions, but is there one that's stable for OutSystems 11?

UserImage.jpg
James Vaughan

Bah...nevermind. I got it to work in OS 11. Great module BTW. 


James Vaughan wrote:

I like how this component functions, but is there one that's stable for OutSystems 11?



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.