How to use variable in the element name

Hi,
I have this item:
input(name: "${profileName}_temp", type: "enum", title: "Climate temperature to set", options: tempOptions, defaultValue: "70", required: true)

to get the selected value from this item, I need to enter : profilename_temp but I have multiple profile and I m looping through so I would like to use ${profilename}_temp to get each profile value for their menu item but its only considered as text. If I log the real name with _temp it return the value but with the ${} it just gives the name of the profil with _temp.
So, is there a way to use the variable to identify the item to get its value?
Thanks!

Try settings["${profileName}_temp"]

Wow, thanks a lot! works fine!

1 Like

I have issue with same kind of menu and I think maybe you can know what is going on... here the link to the post and thanks again for your help!
https://community.hubitat.com/t/input-menu-issue-with-default-value/150012