cancel
Showing results for 
Search instead for 
Did you mean: 

Validating Event Not Firing

Former Member
0 Kudos

Hello,

I have a small problem in my Add-on.

Scenario:

A form with a Matrix that has a linkButtom in a readonly Column

Problem:

if i'm editing a field in the matrix and press the link button no et_VALIDATE event is created before the et_MATRIX_LINK_PRESSED event

Result:

The data is not written to da DataSource

Possible Solution:

Check where the focus is and do the DataWrite myself since the link press does not change the Focus

Question:

howto find the element in focus?

Thanks for your time in advance

Pedro Gomes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Pedro,

Are u using Xml in your program? Then u knw need to wrie in matrix_link_pressed.

I think ur problem is if u click the link button u want to show that particular form rite?

Whts ur exact problem?

Regards,

Anitha

Former Member
0 Kudos

Yes, I want to show a new form on the click of the link button.

I'm using a DataLayer(my code) that is responsible for the database access. So i have to update the DataLayer before the new form is displayed.

I'm updating the DataLayer on the lostFocus event but no event is triggered before the Matrix_Link_Pressed.

The DataLayer can is similer to a XML Document.

Thanks for your reply

Pedro Gomes

Sinfic SA

Portugal

The Problem is that the DataLayer is not beenig update correctly

Message was edited by:

Pedro Gomes

Former Member
0 Kudos

Tel me the link open form is whether the form is predefined or user defined.

Regards,

Anitha

Former Member
0 Kudos

It's a User defined form

Regards,

Pedro Gomes

Former Member
0 Kudos

did you use filters?

Matthias

Former Member
0 Kudos

No, i don't use filters

Regards,

Pedro Gomes

Former Member
0 Kudos

you find the focused cell with pval.row and pval.colUID

hopeithelps

Matthias

Former Member
0 Kudos

Sorry, But gives me the click link not the focused cell

Regards,

Pedro Gomes

Former Member
0 Kudos

Then give the link through Xml

<column uid="itemid" type="116" title="Item ID" description="" visible="1" AffectsFormMode="1" width="102" disp_desc="0" editable="1" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" ChooseFromListUID="ItemCFL" ChooseFromListAlias="ItemCode">

<databind databound="1" table="@PUR_OA_DETAIL" alias="U_itemid" />

<ExtendedObject linkedObject="4" LinkedObjectType="4" />

</column>

Here u specific the object type where u want to connect.

Then u write in ItemEvent of Choose From List

If oCFL.UniqueID = "ItemCFL" Then

Dim oMatrix As SAPbouiCOM.Matrix

oMatrix = OA_Frm.Items.Item(pVal.ItemUID).Specific

DETAIL_oDBds.SetValue("U_itemid", DETAIL_oDBds.Offset, oDT.GetValue(0, 0))

DETAIL_oDBds.SetValue("U_itemdesc", DETAIL_oDBds.Offset, oDT.GetValue(1, 0))

If it helps give me reward points,

Regards,

Anitha

Former Member
0 Kudos

Good tip, But no can do

Since I'm using and external database,

I don't have a Linked object to link to.

in my XML form i use only UserDataSources to then use the dataLayer and update the Database.

Regards,

Pedro Gomes

Former Member
0 Kudos

No issues Pedro,

In ItemEvent instead of using DBdatasource u use UserDataSource

Regards,

Anitha

Former Member
0 Kudos

Hi again,

The Problem is that the Focused Cell is not losing the focus before the link is pressed so i'm not updatating the database whit the new Values.

Regards,

Pedro Gomes

Former Member
0 Kudos

Can u give the Code?

Regards,

Anitha

Former Member
0 Kudos

Can You Give me and email addr so i can send you directily?

Regards,

Pedro Gomes

Former Member
0 Kudos

hi Pedro..

sorry my fault..

anohter idea..what about make a click through code in another cell so a validating event should be fired!

Matthias

just do this in the et_MATRIX_LINK_PRESSED before you run the other code..should work!

Message was edited by:

Matthias Bergen

Answers (0)