All VB Experts,
Â
I have created two parent/child UD tables. Parent/Child UD100-100A contains defect codes. Childkey1 is the code and shortchar01, the description.
Â
Tables UD101 and UD101A record various floor activities in reworking RMA returns. One of the entries in UD101A (txtEpiCustom7) is the defect code. After entering the code, I want to recover the description from UD100A. I have created the following customization:
Â
Private Sub txtEpiCustom7_Leave(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles txtEpiCustom7.Leave
  '// ** Place Event Handling Code Here **
Â
  If (txtEpiCustom7.Text <> String.Empty) Then
 Â
  '// Do Search (listLookup)
 Â
   Dim recordSelected As Boolean
   Dim showSearch As Boolean = False
   Dim whereClause As String = "ChildKey1 = '" & txtEpiCustom7.Text & "'"
 Â
  '// Call Search Function
   Dim datasetUD101 As DataSet = SearchFunctions.ListLookup(oTrans, "UD100Adapter", recordSelected, showSearch, whereClause)
 Â
   '// check to see if DataSet is not null and that it
   '// contains at least 1 DataTable
   If (recordSelected = True) Then
Â
  '// get a reference to the UD101A EpiDataView
   Dim edvUD101A As EpiDataView = Ctype(oTrans.EpiDataViews("UD101A"), EpiDataView)
   '// set the ShortChar07 field to value returned by search
   edvUD101A.dataView(edvUD101A.Row)("ShortChar07") = datasetUD101.Tables(0).Rows(0)("ShortChar01")
   '// notify bound control(s) of data change
   edvUD101A.Notify( New EpiNotifyArgs(UD101Form, edvUD101A.Row, edvUD101A.Column))
      End if
     End If
End Sub
Â
----------------------------------
The problem is that while the code compiles, I receive the error, "Invalid query: where Comany = 'CQE' and (ChildKey1 = '101') BY Key1."
Â
The company ID is indeed CQE and I had entered 101 in the field, however, I believe that I am not properly binding the query to UD100A.
Â
Can anyone help.
Â
Many Thanks,
-Karl
[Non-text portions of this message have been removed]
Â
I have created two parent/child UD tables. Parent/Child UD100-100A contains defect codes. Childkey1 is the code and shortchar01, the description.
Â
Tables UD101 and UD101A record various floor activities in reworking RMA returns. One of the entries in UD101A (txtEpiCustom7) is the defect code. After entering the code, I want to recover the description from UD100A. I have created the following customization:
Â
Private Sub txtEpiCustom7_Leave(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles txtEpiCustom7.Leave
  '// ** Place Event Handling Code Here **
Â
  If (txtEpiCustom7.Text <> String.Empty) Then
 Â
  '// Do Search (listLookup)
 Â
   Dim recordSelected As Boolean
   Dim showSearch As Boolean = False
   Dim whereClause As String = "ChildKey1 = '" & txtEpiCustom7.Text & "'"
 Â
  '// Call Search Function
   Dim datasetUD101 As DataSet = SearchFunctions.ListLookup(oTrans, "UD100Adapter", recordSelected, showSearch, whereClause)
 Â
   '// check to see if DataSet is not null and that it
   '// contains at least 1 DataTable
   If (recordSelected = True) Then
Â
  '// get a reference to the UD101A EpiDataView
   Dim edvUD101A As EpiDataView = Ctype(oTrans.EpiDataViews("UD101A"), EpiDataView)
   '// set the ShortChar07 field to value returned by search
   edvUD101A.dataView(edvUD101A.Row)("ShortChar07") = datasetUD101.Tables(0).Rows(0)("ShortChar01")
   '// notify bound control(s) of data change
   edvUD101A.Notify( New EpiNotifyArgs(UD101Form, edvUD101A.Row, edvUD101A.Column))
      End if
     End If
End Sub
Â
----------------------------------
The problem is that while the code compiles, I receive the error, "Invalid query: where Comany = 'CQE' and (ChildKey1 = '101') BY Key1."
Â
The company ID is indeed CQE and I had entered 101 in the field, however, I believe that I am not properly binding the query to UD100A.
Â
Can anyone help.
Â
Many Thanks,
-Karl
[Non-text portions of this message have been removed]