Question:
The title parameter is passed in a script using DoModal method to open an indexed screen. However, the text set up in the script is not displayed at run time, and the one set up at the screen’s Caption property is instead. How can I make sure the data from title parameter is sent?
Solution:
To do so, there are two possibilities:
- Leave both the Screen‘s and Viewer‘s Caption property blank; or
- At the indexed screen’s OnPreShow event, write a script where its Caption property receives a value from the screen’s instance’s Source.
Example:
Sub IndexedScreen_OnPreShow(Arg)
‘Receives Arg from clicked XControl
Item(“XControlCommand”).Source = Arg
‘Titles the indexed screen
Caption = “Command: “ &Item(“XControlCommand”).Source.Name
End Sub
‘Receives Arg from clicked XControl
Item(“XControlCommand”).Source = Arg
‘Titles the indexed screen
Caption = “Command: “ &Item(“XControlCommand”).Source.Name
End Sub
Result: “Command: XObject”