Cannot figure out how to fetch data from a subform field (on_user_input)

Cannot figure out how to fetch data from a subform field (on_user_input)

Hello, I am a new to Zoho (just bought the license) but I am an experienced programmer and database developer.
Yet I could not figure out how to fetch data from a field in a subform.

I am following the documentation, in my subform, my lookup field execute a field action script on_user_input.
The goal is to fetch an unit cost for the selected product - very basic stuff !

So my script is the following:

selected_ingredient = Ingredient_form[ ingredient_name == row.ingr_name ] ;

Ingredient_form = name of the form I want to fetch the data from.
ingredient_name = name of the form unique key field (since cannot have IDs);


ingr_name = name of my subform lookup field in which the user select the name of the ingredient;

I cannot save the script. Got this error:

In Criteria left expression is of type STRING and right expression is of type BIGINT and the operator == is not valid

What am I doing wrong?

Thanks for the help