[Dual List Box] Duplicate component

Forge Component
Published on 2019-11-09 by João Melo
0 votes
Published on 2019-11-09 by João Melo

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. ;)

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?

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.

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!!!

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.

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

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?