cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping an event

Former Member
0 Kudos
108

Hello,

I would like to stop processing events if some condition occurs.

I have matrix object and I would like to not update the db if this matrix contains data that is not valid upon pressing update button.

Currently I put my validation logic in OnFormDataUpdateBefore. If it returns error I set bubble event to false so it stops further processing (specifically it won't fire OnFormDataUpdateAfter where I presume data is persisted into db)

The problem is that with bubble event set to false I got some "internal error occured" error.

What happened?

Thanks in advance

Kamil

View Entire Topic
Former Member
0 Kudos

Kamil,

Or try with the Item Press event and check if u are getting the same error?

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Thanks Vasu.

I could put it OnItemPressed event but it won't stop FormDataEvent from being fired. My goal here is to not updating db with invalid data. I could also change the data in code so it will become valid but I don't want to do that. I want the user to make necessary changes.

Or maybe there another way to achieve what I want? Again top priority for me is to not updating DB with invalid (from bussiness logic) data when user presses update button.

Thanks

Kamil

Former Member
0 Kudos

Kamil,

Did u try the following..? just some sample code sippet.

Itemevent()  ' In before action = true
   DatavalidationinMatrix()
If not datavalidated
    Bubbleevent = false
End if

Hope it helps,

Vasu Natari.