Query All Records using IN operator on empty array hard error

I'm curious what folk's approaches to overcoming the hard error that occurs in a Query All Records when a condition is IN and is attempting to query an empty array.

Currently, this gives me a hard error "ERROR_CODE_INPUT_ERROR" and I want it to fail more elegantly (or not fail at all) without a crazy workaround.

Steps to recreate:

  1. Setup a Query all Records using a valid set of data where column A (in my screenshot, claim.source_id) is valid - like a string field. Set up a variable B (in my screenshot, claim_source_ids) as an empty array (same results when trying an empty array|safe_array that adds a single null value)

  2. Attempt to run the query. (in this case, the claim_source_id is [] or [null] both with the same results)


    Current Result: You get an ERROR_CODE_INPUT_ERROR when variable B is an empty array [] or a safe array [null].

    Expected Result: You get an empty list in response, because the column A is NOT in an empty array. This should be a valid query that doesn't error.

    Current Workaround: You can "clean" the claim_source_id value by doing a {original_value}|safe_array|filter_empty|push:0 expression. If original_value was empty, this results in [0] which successfully executes the Query All Records and returns no results. But having to "protect" all list inputs to IN queries in Query All Records in this way is wild, inelegant, and shouldn't be required.

Anyone have a better way? Is this a "bug"?

2 replies