Hello i need your help i dont know how to take a data of one screen and send to call in an objet of other screen.
*This post is locked for comments
Hello i need your help i dont know how to take a data of one screen and send to call in an objet of other screen.
*This post is locked for comments
You can do that in two ways, the first is with ApplSetParmValue function and the second is with objectmodel using the StartAppAndAutomate function.
---------------------------------------------------First option-------------------------
--Initiator Screen
Dim sCustID As String
Call GetBufferValue("bCustomer.CustID", sCustID)
If Trim(sCustID) <> "" Then
Call Edit_Save
Call ApplSetParmValue(PRMSECTION_VBRDT, "CustID", Trim(sCustID))
Call ApplSetParmValue(PRMSECTION_VBRDT, "ShipToID", "DEFAULT")
serr1 = Launch("xUsr_Screen\xFE0200.exe", True, True, 0)
Call Edit_Cancel
End If
--Target Screen
Option Explicit
Dim sCustID As String
Dim sShipToID As String
Private Sub Form1_Display()
If Trim(sCustID) <> "" Then
Call SetObjectValue("cCustID_0", Trim(sCustID))
Call SetObjectValue("cShipToID_0", Trim(sShipToID))
End If
End Sub
Private Sub Form1_Load()
sCustID = ApplGetParmValue(PRMSECTION_VBRDT, "CustID")
sShipToID = ApplGetParmValue(PRMSECTION_VBRDT, "ShipToID")
End Sub
-------------------------------------------Second Option---------------------------------------
Dim sDataEntity As String
Dim WithEvents SIVApp As SIVApplication
Dim iSolErr As Integer
Dim iOSErr As Long
Call SetStatusBarText("Abriendo el Programa", "")
Set SIVApp = StartAppAndAutomate("AU\AU01900.EXE", iSolErr, iOSErr)
If iSolErr <> 0 Then
Call Mess(iSolErr)
Exit Sub
End If
If iOSErr <> 0 Then
Call Mess(7519)
Exit Sub
End If
SIVApp.Visible = true
...Codigo
sDataEntity = sivApp.Controls("cInvtID").Properties("Level")
bRegEncontrado = (SIVApp.First(sDataEntity) = sivRecordFound.sivRecFndFound)
While bRefEncontrado = 0
sivApp.Controls("cInvtID").Value = "Item Value"
bRegEncontrado = (SivApp.Next(sDataEntity) = sivRecFndFound)
Wend
sivApp.first sDataEntity
Call SetStatusBarText("", "")
SIVApp.Visible = True
SIVApp.Quit
Set SIVApp = Nothing
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156