FINDROW condition comparing picklist form input to a column in a table


I'm having an issue with the FINDROW function. What I am trying to do is auto input the calorie value for the food item that was picked from a picklist, but running into an error.

Here is what I am trying to do:

1.) user makes a selection for their 'Food Item'. The options are coming from a picklist that pulls from table called 'Item_Picklist'

Table 'Item_Picklist' below:

2.) What I am trying to do is leave the 'Calories' part of the form blank, BUT if they select a 'Food Item' that exists in table 'Item_Picklist' I want to auto input the 'Calories' data.
I input this formula for the initial value for the data cell, but am running into #VALUE! error.

I'd expect for the value of '136' to be picked up and auto inserted when 'Rice' is selected as the food item.

Through some testing I seem to run into an error issues when using FINDROW that has a condition that compares a column form a table that isn't a rowlink to a the app form input that is set up as a picklist. Is my formula wrong or is there a workaround to comparing picklist input from the app form to a table column that isn't formatted as a rowlink?


Hey @Milly thank you for the question! From the formula it appears like you're comparing text on the one side, Item_Picklist[Food Item] which evaluates to Rice for example, with a rowlink on the other side, $[Food Item content] which conceptually contains the entire row with Rice and 136. So this comparison will fail. You could fix your formula by making it a comparison between two strings by editing your FindRow to be something like:

FindRow(Item_Picklist, "Item_Picklist[Food Item]=$[Food Item Content][Food Item]")

Or you could make it simpler by just de-referencing the the Food Item Content variable. So you could possibly replace your entire function with something like:

=IF($[Food Item Content]="", "", $[Food Item Content][Calories])

Hope this helps! Let us know if you have further questions.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.