cancel
Showing results for 
Search instead for 
Did you mean: 

SDK Logistic

Former Member
0 Kudos

HI

I have replace the Choose From List when calling the Inventory on the Sales Order Form with a Formatted Search using the SendKey method, everytime I press the Tab Key it calls the formatted search. It work fine for the Sales Order ,but I have to do the same in every form that call the Choose From List(Inventory).

I used an <u><b>IF Statement</b></u> to accomplish this, specifing the FormType = 139 and the ItemUID = "38" ,

know I have to do it for every form that calls the Inventory , I would like to know wish is the best way to implement this, (By creating a table with all the values of the form that need to call the Formatted Search, using a Select CASE ,If & Else ) Any ideas????

Here is the code that I have:

If pVal.FormType = 139 And pVal.ItemUID = "38" And pVal.EventType = et_KEY_DOWN And pVal.CharPressed = "9" And pVal.BeforeAction = True Then

Set dsa_Matrix = applic.Forms.Item(pVal.FormUID).Items("38").Specific

dst_Value = dsa_Matrix.Columns.Item("1").Cells.Item(pVal.Row).Specific.Value

If dst_Value = "" Then

BubbleEvent = False

Call applic.SendKeys("+")

End If

End If

Accepted Solutions (1)

Accepted Solutions (1)

barend_morkel2
Active Contributor
0 Kudos

If it is a "simple" where the keydown event is only needed for your tab action - it is straight forward.

Add the filter for the Key Down event only on the forms you are intersted in.

Then you don't have to use the if or case statements.

(Just check if it was the tab key on your matrix and run your logic).

This will work great for you.

---

If you have key down events (other) than the tab on the matrix object - then you will have to use the case statement to check if it's the correct form (case is more optimal solution than if statements)

Answers (0)