Form Input Validation?
Posted: Sun Oct 15, 2023 12:05 pm
Good day,
Maybe someone can point me in the right direction.
I have several cases where I want to check in an existing table for the occurrence of a field value and I do not want to have that item value duplicated in the table field.
A good example of this could be an email address and I do not want a duplicate email addresses entered and possibly I want the email address value to be unique in an EmalAddress field.
is there any way in WWB to add in a select statement that would check for the existence of a value and then return a Boolean, true or false if the value already existed at the textbox entry level?
I know I can check for this in the submit process, but what I am after is a validation that happens when the user enters the email address, and it is validated prior to continuing the data entries or raises an alert message when exiting the email address input textbox.
I looked at the options in the Form.TextBox Validate tab in WWB, but did not see anything that would do this.
I also looked at the Form.TextBox Events tab and can add an event onfocusout and they I selected under Action: javascript, but this allows for is seems only for an alert message. I was hoping it would open up a code block where I could add in a java snippet to perform the select statement and return true if the value exists or false if the email value does not exist.
Maybe there is some other place or way to do this in WWB?
My goal is to perform the check at the textbox level and not allow the user to continue inputting.
If I am using C# I can add code at Control.Leave event with code triggered on that event to stop the user and not allow them to continue without changing the email address value. if I want the user to continue with data entry but raise an alert message, I can use the Control.Lostfocus event and add my snippet triggered by the Lostfocus event.
Hope this explains what I am looking for in WWB?
I checked out the infobubble setting, but that allows for color setting changes, etc.; but no place I could see to enter in a code block.
Maybe these features do not exist in WWB and if not can someone advise this cannot be done, then I'll look for other options.
Maybe this can be done and I just don't know where to find where to add in the code snippet within the WWB interface!
Custom code allowed in the Form.EntryObject validate level would be great and maybe I'll add this feature into enhancements for WWB?
In the Form.TextBox Validate tab, under the Input Mask-Mask: option there is an open blank area where an EditBox entry could be added allowing the entry of a code snippet at the validate level.
Just a thought?
Pete,
Maybe someone can point me in the right direction.
I have several cases where I want to check in an existing table for the occurrence of a field value and I do not want to have that item value duplicated in the table field.
A good example of this could be an email address and I do not want a duplicate email addresses entered and possibly I want the email address value to be unique in an EmalAddress field.
is there any way in WWB to add in a select statement that would check for the existence of a value and then return a Boolean, true or false if the value already existed at the textbox entry level?
I know I can check for this in the submit process, but what I am after is a validation that happens when the user enters the email address, and it is validated prior to continuing the data entries or raises an alert message when exiting the email address input textbox.
I looked at the options in the Form.TextBox Validate tab in WWB, but did not see anything that would do this.
I also looked at the Form.TextBox Events tab and can add an event onfocusout and they I selected under Action: javascript, but this allows for is seems only for an alert message. I was hoping it would open up a code block where I could add in a java snippet to perform the select statement and return true if the value exists or false if the email value does not exist.
Maybe there is some other place or way to do this in WWB?
My goal is to perform the check at the textbox level and not allow the user to continue inputting.
If I am using C# I can add code at Control.Leave event with code triggered on that event to stop the user and not allow them to continue without changing the email address value. if I want the user to continue with data entry but raise an alert message, I can use the Control.Lostfocus event and add my snippet triggered by the Lostfocus event.
Hope this explains what I am looking for in WWB?
I checked out the infobubble setting, but that allows for color setting changes, etc.; but no place I could see to enter in a code block.
Maybe these features do not exist in WWB and if not can someone advise this cannot be done, then I'll look for other options.
Maybe this can be done and I just don't know where to find where to add in the code snippet within the WWB interface!
Custom code allowed in the Form.EntryObject validate level would be great and maybe I'll add this feature into enhancements for WWB?
In the Form.TextBox Validate tab, under the Input Mask-Mask: option there is an open blank area where an EditBox entry could be added allowing the entry of a code snippet at the validate level.
Just a thought?
Pete,