Find record using conditional expression not working

I am attempting to find a record using the Get Record endpoint on a table of zipcodes. The table only has a 'zipcode' and 'id' field.

I am trying to use an expression to choose between 2 arrays that have the possible zipcode I want to search for.

One array is the JSON input of the incoming POST call.

The other array is a remote API call to a geocoding API that returns an array called rentCast.

My expression looks like this:

$var.rentCast.zipCode != null ? $var.rentCast.zipCode : $var.item.zipcode

If I use this expression in a Set Variable it gives the correct result, so I know the expression is returning correctly. See first screenshot.

If I use this expression in the 'field_value' for the Get Record request, I get an error that the text filter requires a scalar value. See screenshot below.

Not understanding why I am getting the error.

3 replies