cancel
Showing results for 
Search instead for 
Did you mean: 

et_VALIDATE event handling

Former Member
0 Kudos

Hi, there!

I have two <i>EditText</i> objects on a custom UDO form, the

first one is for <i>CardCode</i> value, the second - <i>

CardName</i>. I'm trying to actualize <i>CardName</i>

value when the <i>CardCode</i> changes, i.e. when <i>

CardCode.et_Validate</i> event occurs (am i wrong?),

but when in an event handler sub I put something in the<i>CardName</i> the <i>

CardCode.et_Validate</i> throws again 'cause the <i>CardCode

</i> field losts its focus I think and it is a problem:

event handler starts again and again... any suggestions

are welcome.

If (pVal.EventType = BoEventTypes.et_VALIDATE) Then
   If (pVal.FormTypeEx = "myForm") and (pVal.BeforeAction = False) Then
      If (pVal.ItemUID = "eCardCode") Then
         oItem = oForm.Items.Item("eCardName")
         oEdit = oItem.Specific
         'next line causes new et_Validate for eCardCode
         oEdit.String = "whatever"
         BubbleEvent = False
      End If
   End If
End If

Thanx

Sergey

Accepted Solutions (1)

Accepted Solutions (1)

AdKerremans
Active Contributor
0 Kudos

Hi Sergey,

The second time the validate event is fired, is within another event so if you check for the innerEvent it should work.

like this:

If (pVal.EventType = BoEventTypes.et_VALIDATE) Then

If (pVal.FormTypeEx = "myForm") and (pVal.BeforeAction = False) and (not pval.InnerEvent) Then

If (pVal.ItemUID = "eCardCode") Then

oItem = oForm.Items.Item("eCardName")

oEdit = oItem.Specific

'next line causes new et_Validate for eCardCode

oEdit.String = "whatever"

BubbleEvent = False

End If

End If

End If

Regard

Ad

Former Member
0 Kudos

Hi, Ad!

Yeppp! It works. Thanx!

Regards,

Sergey

Answers (0)