fill in a filtered list dynamically

Hello ALL,

I have two list and i want them to be filled dynamically by a method, the first is a normal list and the second is a filtered list.
I have already managed to fill in the first automatically by a client method.
The values of the first list are: A, B, C, since the second list is a filtered list which depends on the first list Then:


If the first list contains A the second filtered list will contain the value 1
If B => 2
If C => 3

below the code I used from a forum with the event onLoad: 

var dropdown = getFieldComponentByName('listeOne');
var teams = aras.IomInnovator.newItem("ItemType", "get");
teams.setAttribute("select", "id, keyed_name");
teams = teams.apply();

listOfTeams = [{
label: '',
value: ''
}];

for (var i = 0, teamCount = teams.getItemCount(); i < teamCount; i++)
{
var team = teams.getItemByIndex(i);
listOfTeams.push({
label: team.getProperty("keyed_name"),
value: team.getProperty("id")
});
}
dropdown.component.setState({list: listOfTeams});

So i want to filter the second list (1,2,3) based on the values in the firsll list (A,B,C)

Is there any way please to dynamically fill in the second filtered list  ?