Hello,

Im new on the Outsystems, and try to create a app and have 3 combo box, I try to link they.

I list the all combo box with my entitys, in the first I list the countries, the second I List the City, and the third I list neighborhoods, but I need to put automaticaly, when I choose my country, he make a filter only my city of this county, and I choose the city he make a filter of my neighborhoods of this City.


I have my relationship with my tables, I save correctly but I cant make this filter between my combo boxs.

they list all off my data.



Hi Viktor,

What you are trying to implement are cascading combo boxes. 

This video tutorial explains in detail how to implement this.

Regards,

Nordin

Hello viktor carvalho,

Welcome to Outsystems Platform!

According to your need I have created Demo App. Please find attached OML.


Cheers!

Afaque

Nordin Ahdi wrote:

Hi Viktor,

What you are trying to implement are cascading combo boxes. 

This video tutorial explains in detail how to implement this.

Regards,

Nordin

Ty for the support @Nordin, sorry but Im new and its a lil dificult for me, the video show that the 3 combo box its the result of filter from the 1 and the second, but I try to do a lil diferent, I need a lil diferent I want choose 1 opcion on combo box 1 and the second combo box filter from the 1 choose and the 3 option filter from the second choose. but my combo box don't make any filter, I don't know why, in my aggregation when I test with the values its all ok. and I dont understand why he use special variable and he don't show data type of special variable.


I attach my lil program,


viktor carvalho wrote:

Hello,

Im new on the Outsystems, and try to create a app and have 3 combo box, I try to link they.

I list the all combo box with my entitys, in the first I list the countries, the second I List the City, and the third I list neighborhoods, but I need to put automaticaly, when I choose my country, he make a filter only my city of this county, and I choose the city he make a filter of my neighborhoods of this City.


I have my relationship with my tables, I save correctly but I cant make this filter between my combo boxs.

they list all off my data.



To achieve that you need to add an action on the On Change of the first Combobox where you will filter the second combo box by the identifier of the selected item on the first Combobox  and refresh the 2 Combobox (do the same logic to from the second to the third Combobox )


Best regards

Carlos Lessa


Solution

Hello viktor carvalho,

I have corrected your code please find attached OML. The issue was with the filters and variable binding.


There were few mistakes in your code:

1. Avoid using exact Entity name  for the Entity Identifier Type variable. In your case Pais is a entity but you have used Pais name for local Variable which is having type Pais Identifier.

2. You have filtered the aggregate by using Input Variable but to Comobox you have binded the local variable. So updated value will be store in local variable is it will affect the changes on DataRegresh as there is still input variable is used for filtering.  I have binded Combobox with input variable  so once you change the value updated value will be store in input variable.


Cheers!

Afaque Shaikh

Solution

Afaque Shaikh wrote:

Hello viktor carvalho,

I have corrected your code please find attached OML. The issue was with the filters and variable binding.


There were few mistakes in your code:

1. Avoid using exact Entity name  for the Entity Identifier Type variable. In your case Pais is a entity but you have used Pais name for local Variable which is having type Pais Identifier.

2. You have filtered the aggregate by using Input Variable but to Comobox you have binded the local variable. So updated value will be store in local variable is it will affect the changes on DataRegresh as there is still input variable is used for filtering.  I have binded Combobox with input variable  so once you change the value updated value will be store in input variable.


Cheers!

Afaque Shaikh

Thanks Afaque, I look your modification. I didnt know the difference between Input parameter and Local variable, i look your 2 programs and are different on the Refresh data, But dont understand why. Sorry for the questions, but I'm new in the outsystems .

Since you are new in OutSystems I would recommend you to take this course:

https://www.outsystems.com/learn/courses/114/developing-web-apps-outsystems-11/

Will give you all the first steps to build amazing apps with OutSystems

Good learn

viktor carvalho wrote:

Afaque Shaikh wrote:

Hello viktor carvalho,

I have corrected your code please find attached OML. The issue was with the filters and variable binding.


There were few mistakes in your code:

1. Avoid using exact Entity name  for the Entity Identifier Type variable. In your case Pais is a entity but you have used Pais name for local Variable which is having type Pais Identifier.

2. You have filtered the aggregate by using Input Variable but to Comobox you have binded the local variable. So updated value will be store in local variable is it will affect the changes on DataRegresh as there is still input variable is used for filtering.  I have binded Combobox with input variable  so once you change the value updated value will be store in input variable.


Cheers!

Afaque Shaikh

Thanks Afaque, I look your modification. I didnt know the difference between Input parameter and Local variable, i look your 2 programs and are different on the Refresh data, But dont understand why. Sorry for the questions, but I'm new in the outsystems .

Please complete below given course video tutorials and excercise n will have enough knowledge to get started with OS.

https://www.outsystems.com/learn/courses/114/developing-web-apps-outsystems-11/