cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Form - How to validate a keyword exists in Autofill Keyword Set?

Harshal_Shravgi
Star Contributor
Star Contributor

We are on OnBase 17 SP1. We have configured a Unity form containing a primary field of an Autofill Keyword Set. I have binded this field with Autofill and marked the field as mandatory. Now, user can enter any value in this field and submit the form. 

I want to invalidate this field if user entered value does not exists in Autofill. I do not want to perform this validation using Workflow.

I need to display the validation message to user while submitting the form.

Any ideas on how to implement this?

8 REPLIES 8

Kathy_Rickertse
Star Contributor
Star Contributor

Would it work to create a custom action that checks for the initial field to be not empty (meaning the user entered a value) and one other keyword in the auto-fill is empty?  If the second keyword is empty, the first field is invalidated and a message is displayed that the original value is invalid or does not exist.  

My autofill is Employee ID (primary field), Employee last, first, middle name. On my unity form, I have kept Employee ID as user entry field. On entering correct employee id, remainder of the fields (Employee last, first, middle name) are automatically populated. Since user should not be able to enter Employee last, first, middle name; I made these fields read only.

If user enters wrong value in first attempt then my custom action to check Last Name is null works fine but if user enters correct employee id in first attempt then Employee last, first, middle name are populated from Autofill but after this user again change Employee id (to something invalid) then Employee last, first, middle name are not cleared and my custom action to check Last name is empty fails.

Kris_Conrads
Elite Collaborator
Elite Collaborator

A Select List field has a "Value must exist" option at the bottom of the properties.  That will provide immediate feedback to the user if the value isn't in the data set for that field.

Do you mean, in Keyword Types configuration-> Usage Restrictions -> Keyword Must Exist.

This option requires a dataset and I want to validate from Autofill Keyword Set.