Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

et_VALIDATE event handling

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

replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question