Get value from dropdown

Hi everyone, I am trying to read a value from the dropdown to display it in another dropdown, it worked like a charm at first then all of sudden stopped working.

I have two dropdown fields
1- productcode
2- relatedproducts

in the 2nd dropdown the Data source is:

SELECT DISTINCT relatedproducts as value FROM tblproducts WHERE productcode=:queryprod

$query_params[‘queryprod’] = request()->get(‘productcode’);

anyone can advice? thank you

1 Like

I managed to fix it by using:

$query_params[‘queryprod’] = request()->lookup_productcode;

1 Like

Hello,
Thanks for asking this problem, I am also facing same.

did it work with what I mentioned previously?