Forum Academy Marketplace Showcase Pricing Features

Show error text if no ID match

I have a page where the user enters an ID into an input box, and when they hit the submit button, the app checks the associates data type to see which record has that ID and creates a new record in a log data type.

Great… what happens if the user enters an ID that doesn’t match anything in the associates data type? I want to show an error message.

In the workflow, I’m trying to say the following: “When the user clicks the submit button, find the first item in the Associates data type that matches what was typed into the input box. (I have this first part working) If the input value doesn’t match anything in the Associates data type, then display the error text and do not create a new record in the log data type.”

I keep trying different combinations and it keeps coming up red. Can someone please explain what I need to do to get this working?

EDIT: I just got the text to show using the settings below. However, it still creates a blank entry into the database.


Hi there, @bryan.beneker… the condition to figure out whether or not to show the alert should be the same as the search expression from our recent thread, but instead of using :first item, you would have :count is 0 (I believe is empty would also accomplish the same thing). So, you are saying when a count of the number of things in the Associate data type with an ID that matches the ID entered by the user is 0, show the alert. Make sense?

Hope this helps.


Hi @mikeloc ! Thank you! That worked like a charm. I looked over the documentation last night, but apparently I need to look it over again to try to get it to sink in. Simpler is better. Much cleaner than what I came up with (don’t know if you saw my late edit).

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.