Comparing a single value against a list of all values in a column for 'Invalid value error' property

Hi There,

I have created a Search Log table which allows me to have a search filter screen with a single input. When the user scans a QR code it places that string value into this field and then auto saves, and navigates the user to a Deck List of the matching results. This works great until the enter a result which it cannot find results for. The Deck List just is empty and it looks like something is broken.

I was wondering if it would be possible to use the โ€˜Invalid value errorโ€™ property on the Search Input field to pop-up a warning message if that search string cannot be found?

Perhaps something like IF([_THIS] <> SELECT(plant[name_plate_id]), โ€œNot foundโ€).

Any help would be greatly appreciated!

Regards,
Sebastian

0 3 498
3 REPLIES 3

Steve
Platinum 4
Platinum 4

Why not check whether any results occurred first, then navigating to a detail view with an appropriate message if so?

If your filtered view is implemented as a slice, you can test whether there are any results with:

ISBLANK(FILTER("My Slice", TRUE))

Then you can choose the next view with:

IF(
  ISBLANK(FILTER("My Slice", TRUE)),
  "Not Found",
  "Search Results"
)

where My Slice is the name of the slice with the results, Not Found is the name of a detail view that displays a suitable message if there are no results, and Search Results is your deck view for displaying the results.

Amazing idea! I will give this a try and report back.

Thanks @Steve

Steve
Platinum 4
Platinum 4

To use the Invalid value error property, the Valid if expression must first find the value invalid, so you could do what you want using these two properties.

Valid if

ISNOTBLANK(SELECT(plant[name_plate_id], ...))

Invalid value error

"Not found"
Top Labels in this Space