48
Views
5
Comments
Solved
Change container with dropbox selection
Application Type
Reactive
Service Studio Version
11.9.0 (Build 33413)

Hi there,


First of all, i must say that i'm starting to do my first steps with OutSystems.

I already follow some paths (congratulations to the team that provided that. THEY ARE GREAT for noobs like me) and now i'm starting to develop my very first module.

In this case, i want to build a dropbox that shows different containers in each option that the user chooses.

I follow the .oml that @Vikas Sharma shared here, e created all variables, the action but isn't working. Also, i can't find any relation between the variable "TextVar" with the dropbox and i don't know if the action i built make any sense (or if it's good practice to create actions like this)

I uploaded the .oml that i'm working on.


Best regards

ComprasNacionais.oml
2020-02-12 12-01-10
Bruno Gomes
Staff
Solution

Hi João,


From what I understood you want to show the different inputs based on the option chosen on the dropbox.


One of the things that I noticed based on your OML was the lack of using your variables to show or hide the inputs. So what I did was to wrap the inputs inside IFs.


Another thing was to simplify the action used on the OnChange


So i added a new action where i have changed the code:


I have uploaded a new version of your OML.


I hope this helps to resolve your issue.


Best regards,

Bruno Gomes


ComprasNacionaisNewVersion.oml
2020-12-15 19-38-29
João Ferreira

Hi Bruno, 

Thank you for your help and explanation.

I used your .oml file and published it.

You can see in the gif that after changing the options of the Dropbox, some containers maintain (instead of disappearing).

Do i need to do any refresh in the Action to clear the screen?


Regards

2020-12-15 19-38-29
João Ferreira

Sorry, my bad.

I still add the first action (the one that i created). I deleted, put the OnChange you created and is working as expected.

Once again, thank you for your help.

2020-02-12 12-01-10
Bruno Gomes
Staff

Hi João,


Change the action on the OnChange to use the new version that I have created. I don't know if you have done already that.

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi João,

As a solution to  the mentioned use-case, you just have to wrap the label and input widgets within a nested IF widget with a specific condition.

Refer the attached update .oml file

Hope his helps you!


Kind regards,

Benjith Sam

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