Display Error Message when selecting a incorrect/mismatch value in the drop down

Hi,

Problem Statement:
I have a table below 6 columns:

  • ID (Text)
  • Employee Name (Text)
  • Employee ID (Int)
  • Active (Boolean)
  • Date of Joining (Int)
  • Supervisor Name (Text)

The application loads values from the table to their corresponding field as mentioned above.

In this scenario, we are trying to display an error message when the value selected for employee ID field (which is a single select in the application) does not match with the corresponding employee name.

For example:

In this table, system should display error stating “Selected Employee is incorrect” when user Enters Test User 1 in ‘Employee Name’ and selects 778899 from ‘Employee ID’ drop down in the application.

Question:

  1. Does tulip have any special operation or function that can used for comparing column values in tulip table?
  2. Are there any simple way to achieve our goal.

Hi!

You can use conditional logic inside your app to show an error message when a data entry does not match/is outside of set parameters.

However, can you first tell us more about your use case to help us come up with the best solution? I have two specific questions:

  • Is there a reason you are requiring users to manually enter their employee information on this step?
  • What process are users executing in this app, and what is the purpose of this particular step within the process?

Hi,

Thanks for your response.

Basically, we are trying to create a leave approval application, with below field’s:

  • Employee Name (Text)
  • Employee ID (Int)
  • From Date (Date)
  • To Date (Date)
  • Reason (Text)

Employee Name is a text field where user will enter their name per the company policy and Employee ID is a single select which will load the employee id’s from the table.

With this set up, there is a chance that user can accidently select incorrect employee id from list displayed and submit the request. So, in-order to prevent the incorrect selection, we would like to display an error when the employee’s name and Employee ID selected does not match table record.

Regarding the questions:

  1. Is there a reason you are requiring users to manually enter their employee information on this step?
    Response: Employee name is text field, which needs to be entered manually, please free to suggest if there any better way to handle it.

  2. What process are users executing in this app, and what is the purpose of this particular step within the process?
    Response: It’s a leave request application, user will be entering details requested and submitting it. There is only one process step. When user clicks submit, email will be trigger to the supervisor for approval.

Please be free to let me know for additional details/questions.

Thanks

Hi!

You can create a query with an aggregation that returns the employee ID when a user enters the employee’s name. This eliminates the need for the user to manually select the employee ID, helping to reduce errors.

If you’re unfamiliar with table queries and aggregations, this article can help you understand them better.

Since you’re trying to send emails to supervisors, I would also suggest to change the data type of the supervisor to ‘user’ instead of ‘text’. This way, the email will be linked to the user.

Have you tried using the Users table on the Users page in Settings? If all your users are listed in this table, you can create custom fields to add details like employee ID, supervisor, and more. You can also load the current user based on the logged-in user, eliminating the need for manual entry of employee names or IDs. This article could be helpful if you’d like to learn more about it.

Let us know if you have any other questions!

Thanks,
Andrea.

1 Like

Hi,

Thanks for the response and the resolution provided was very helpful.

-Manoj