71
Views
7
Comments
dropdown OnChange does not give me current value
Question

hi,

i have a dropdown with values list.

i used "custom" option with an expression to show what is selected.

as expression i use "list.current.value".

perfect !

in event OnChange i send the same value "list.current.value", but....a reach the first value...why????

i attached my example...

ProvaEmanuele.oml
2025-02-12 23-46-07
Rúben Simões
Champion

Hi,

The problem with your solution is that the Variable used is the current value in the list, and should not be used that way, you need another variable to control the selected value, I have 2 solutions that might help you.

Thanks,

Rúben Simões

ProvaEmanuele.oml
UserImage.jpg
emanuele mantovanelli

thank you,

the solutions you get me are the same i done, but both have something i don't like.

1°)in my real page i'll have more 40 dropdown...it's too hard have a variable for each dropdown.

2°)almost near goal, but i can't associate the entity column to the dropdownserarch. then i have the problem of 1° solution.

is no possible to get the selected element as in expression is showed?

2026-02-16 05-51-10
Sahana K

Hi emanuele mantovanelli,
If you use the current variable, in dropdown variable the current record will be fetched in the On Change event. Instead, create a local variable, assign the dropdown value to it, and use that local variable in the message.


Thanks,
Sahana 


2023-11-22 10-51-50
Jozy Sohail

Hi Emanuele,

you need to create a new local variable and use it as the dropdown variable and also as an input to onchange of dropdown otherwise it will always take the current value of your list.

I have updated your OML, hope it helps,


ProvaEmanuele.oml
2025-12-03 17-22-41
Lavanya Kamalaguru

Hi @emanuele mantovanelli,

I have updated your oml file. Please take a look into that.

ProvaEmanuele.oml
2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi @Lavanya Kamalaguru,

Please refer below OML I have done some changes in the code.

If any issue let me know!!!



Regards,

Rajat



ProvaEmanuele.oml
2026-01-28 16-57-48
Mihai Melencu
Champion

Hey @emanuele mantovanelli ,


I noticed you needed a list of dropdowns, so I have updated your OML accordingly:

  1. I created a list of empty records based on your entity. Currently, the data action generates 10 records, but you can adjust the Iterations variable to fit your use case.

  2. I added a local variable to store the currently selected value.

  3. In the DropdownOnChange event, I used the local variable to display a message.

If you need any further assistance, feel free to reach out.

This is the result:

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