I have the following code will farcall a procedure that contains “rundialog”. The form that is used has a search field, a text list object that has data coming from another database of contacts with the option of selected value set to a variable called vSelected.
Works great when I was not using farcall but just running the procedure from one database. When using farcall I can not get the vSelected variable to show a value. I have tried so many different tweaks to the procedure I think I have lost all of my ability to think clearly about why it is not working. I have tried passing parameter to the “SearchStuff” procedure, then using the setparameter to return a value of vSelected. Nothing, I have reversed the order, Nothing, I have put messages at every step and I just can’t figure this out.
With all that said, I am sure it will be something simple and obvious. Here is the basic code. I have left off all the iterations. The end result I am looking for is to have one place to store about 12 different search forms, call those from many different databases and return the selected record to the calling database.
farcall "Database","SearchStuff"
The “SearchStuff” procedure runs this code
fileglobal myDialogButton
myDialogButton=""
loop
rundialog {Form="Search People" Sheet=TRUE Height=525 Width=425 OkButton="Select" OkButton="Select" autoedit="SearchField" variabletype=fileglobal}
stoploopif info("trigger")="Dialog.Close"
if info("trigger") = "TextDisplay.NewProspect"
myDialogButton=info("trigger")
closeactiveobject
settrigger "Dialog.OK"
endif
endloop