Mapping child case_name from lookup table

Hi there,
My survey is surveying households about the farming plots. In a household-level form I have a repeat group which loop through all child cases (id_plot). The first question of each loop is a lookup table to select the current plot.

I'd like to refer the case_name based on the lookup table response. Path for the lookup table question #form/repeat_prod_util/F2

I tried ChatGPT and it gave the below suggestion for a hidden value (which I then display in the subsequent question labels) but it doesn't work.

if(count(instance('commcaresession')/session/data/repeat_prod_util/F2) > 0, instance('commcaresession')/session/data/repeat_prod_util/F2/@case_name, '')

Any suggestions?