Hi ,
Can you please elaborate your requirement ... UDF_1 , UDF_2 and UDF_3 are they matrix columns ?
If you want to get any value and validate that before you actually add or update the document then you can do it in BeforeAction = true event .
Regards