Announcements
Is there a way to do this. I have searched and messed around with it but no success. I ended up having to insert data via Solomon's database API calls using the TI file.
Consider a scenario where you have a custom screen (VB tools exe) that is call from a custom button from employee screen. When you generate the ti macro I see where you can programatically push the button but nothing that shows you how to access the fields in the other screen. Keep in mind this a a separate exe not a child form.
Does anyone know if there is a way to accomlish this without accessing the database directly via API calls?
*This post is locked for comments
Hi Albert,
Since this is a completely separate SL exe file, typically you would just create a second TI routine to import into the second screen as a separate TI batch. The button on the main form is just launching the second exe, probably modally. There is no direct communication possible between the first and second SL screens. If the first screen is passing information to the second (to default fields for example) it does so on the command line as parameters or by creating a temp file from one of the Appl Get/Set Parm calls. Return values are passed using the same mechanism.
TI runs locally within a given exe. There isn't any way to reference controls in a separate exe. Even using Object Model you would still need a new app reference to the second screen. As you mentioned, controls on subforms can be referenced - because they exist within the same executable / process.
In order to generate a control macro against the second custom screen, you might need to add the screen to the Screen Maintenance form if it isn't already there so that the generate macro routine sees it as a valid SL screen.
Paul
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156