Testing unicity of a record

Hi everyone,

I am building a review site and I am hitting a wall on a very simple flow. In the add review page, a user needs to select a company. So I have this setup:

I have a search input for the company, a website input and an address input.

Here is what I would like to do:

  1. At first, the only input displayed is company name and the user starts typing. I would like to use the autocomplete feature of the searchbox to help the user select easily an existing company
  2. if the company exists, then the user selects it and a button next is displayed, I then send the name of the company in a parameter to the URL to the next page
  3. if the company is not available via the autocomplete, then the two additional inputs are displayed. When the user finished to input all data, a next button is displayed which starts a workflow for the creation of a new company and transfer the data via a url parameter to the next page

I am able to do 2 and 3 independently but I am unable to perform the automatic selection of each workflow. I have tried to use a conditional display for the two inputs based on the input in the searchbox (only if the searchbox value is empty) but given that the searchbox starts empty these fields are always displayed when I start the page.

I am stuck on the logic and would really appreciate some help!

Thank you very much,


Maybe try something like:

If the list of companies in your database does not contain that input AND your input is not empty … then show your inputs.

Hope that makes sense. :man_technologist:t2:

Seems like a good idea, I am struggling implementing it.
I did the following test:

If the searchbox is not empty and the search results is empty then change the color of the text “test” in red:

It doesn’t work though, any idea what I am doing wrong?

I found my issue, the condition was not set properly! The correct expression is:

Thanks, the issue is now closed :slight_smile: