Changing default file name in task.DisplaySetupDialog
Forums
Hi, I'm trying to change the default file name (join.imd to ABCinc.imd for example) in task.DisplaySetupDialog.
But when I excute the script, the default name displayed is still join.imd. Is there a way to change the default name?
I also want to change the default selection to: task.PerformTask dbName, "", WI_JOIN_ALL_IN_PRIM
How can I do that with task.DisplaySetupDialog?
Thanks for help.
Sub Main
Set db = Client.OpenDatabase("Sample-Detailed Sales.IMD")
Set task = db.JoinDatabase
task.FileToJoin "Sample-Inventory.IMD"
task.IncludeAllPFields
task.IncludeAllSFields
task.AddMatchKey "PROD_CODE", "PROD_CODE", "A"
dbName = Client.UniqueFileName ("ABCinc.IMD") <-----Won't keep the new name
task.DisplaySetupDialog 0
Set task = Nothing
Set db = Nothing
Client.OpenDatabase (dbName)
End Sub
I have never used the task
I have never used the task.DisplaySetupDialog in any of my scripts because there are so many limitations around them. Like you noticed you don't know what the user has actually selected if you need that information in the future sections of the script. I have always ended up creating my own dialogs as I then can control 100% of what is going on.
Hello ratanac and welcome to
Hello ratanac and welcome to the site.
Unfortunately what you want to do is not possible. The task.DisplaySetupDialog takes over for the task.performTask and this is where you add the default file name and the join type. There are no parameters that I know of to add this information.
When I have come up in these scenarios I have created my own dialogs either in IDEAScript or Python but this can be very time consuming.