[SOLVED] Some questions on List box. - Noob

[SOLVED] Some questions on List box. - Noob

I've managed to figure out myself. Anyway, I've attached along the example I used. Hope anyone with the same problem can benefit from this.



I just pick up OutSystems programming this week and have some difficulties in using Listbox.
Before you fire any comment, I've search this forum and google the web but nothing point me at the right direction.

So here we go...

I have 2 listbox, Listbox A and Listbox B.

Listbox A is a single selection listbox with a list of Application Skillset name (e.g. Adobe Photoshop, Microsoft Office)

Listbox B is a multiple selection listbox with a list of User name (e.g. Tom, Dick, Harry)

I have the database set up as such,

Skillset (id, skillset_name)
User (id, username)
UserSkill (id, user_id, skillset_id)

So in my application, when I choose certain skillset (in this case Adobe Photoshop), I hope to get the username with the skillset in Listbox B selected.

More details:

1, Adobe Photoshop
2. Microsoft Office
3. Outsystems

1, Tom
2, Dick
3. Harry

1, 1, 1    (Tom know Adobe Photoshop)
2, 1, 3    (Tom know Outsystems)
3, 2, 1    (Dick know Adobe Photoshop)
4, 2, 2    (Dick know MS Office)
5, 3, 3    (Harry know Outsystems)

So with reference to the above data, when I choose the Adobe Photoshop in ListboxA, I want to get Tom and Dick name selected/highligthed in Listbox B.

So far I can get the list out and onchange it will trigger an action to
  • For each - which is the selected Skillset (In this case Adobe Photoshop)
  • Get all the user
  • For each user, search the UserSkillBySkill_Id (by Adobe Photoshop ID)
  • If it return count <>0, the user have the skill set
  • Assign ListboxB.List.Current.Boolean.Value as True (Selected) 
  • Finally do a Ajax Refresh on ListboxB
So far it can't work and I'm scratching my head hard! ^_^

Thanks for your time.