How do I unimport a file from vbscript? Because the file I imported has a lot of global variables, which coincides with the other file I want to import.
I just want to import 1 file at a time in order to prevent overlapping of global variables. How do I achieve that? Thanks.
All data made available to a current script context MUST be unique. If you use 'ExecuteGlobal statement' in the main context, routine or function then all data is available globally. Use 'Execute statement' to make data available in a current context.
http://msdn.microsoft.com/en-us/library/342311f1(VS.85).aspx
Related
I am using NesTing library within omnet++. For scheduling of switch gates a gate control list is defined within a xml file which is loaded by the .ini file. For example,
**.n5.eth[3].queue.gateController.initialSchedule = xmldoc("schedules.xml", "/schedule/switch[#name='n5']/port[#id='3']/schedule")
**.n6.eth[1].queue.gateController.initialSchedule = xmldoc("schedules.xml", "/schedule/switch[#name='n6']/port[#id='1']/schedule")
**.n6.eth[2].queue.gateController.initialSchedule = xmldoc("schedules.xml", "/schedule/switch[#name='n6']/port[#id='2']/schedule")
I would like to change the parameters of that 'schedules.xml' file dynamically and want that the updated file will be re-read by the configuration file so that the updated GCL will be implemented. I can ofcourse, give some more information to clear my question if needed.
I believe NesTing is not prepared to change the parameters and scheduling on the fly. So you cannot do that.
I'm using the environment variable $PMTargetName#numAffectedRow, but the TargetName is a parameter(parfile)
I'm trying to do this way:
$PM$$SOURCE_TABLE#NumAffectedRows
Is not working :/
What you need to use here is the name of the Target Transformation, not the table name. So assuming you've got a Target Transformation named MyTargetTable and you use the Target Table Name property to set the actual table name to e.g. Customers, then:
$PMMyTargetTable#TableName should give you Customers
and $PMMyTargetTable#NumAffectedRows should get you what you're looking for
The variables to be used in pre/post session commands need to be passed to the session from parameter file. e.g. $PMTargetName should be used in your session e.g. as Target Table Name. If you are doing this, then this will work - ${PMTargetName}#numAffectedRow. Adding parentheses will ensure your variable is expanded before #numAffectedRow is appended to it.
If you are not using $PMTargetName anywhere in your session then IS will not expand it. You should declare it as your workflow variable. And since you have already defined it in parameter file...rest should work.
I am trying to create a main job in Talend that would scan a directory for multiple files (f1.csv, f2.xls...)and then run a separate job created for the specific file. I would like to create a context variable that captures the filename and calls the appropriate job. How can I setup the context variable to store the filename of the found file and pass it to the other jobs?
Create a job called child_job. Inside, go to context tab, and create a new context variable called file with the type String. Inside, you can put components that references this context.file variable.
Now, create another job called main_job. Inside it, put a tFileList. Configure the settings in this component with the desired path where you want to find the files. Then, drag the child_job from the left panel (job designs) or put a tRunJob and set it to call the child_job job. Finally, join the tFileList with the iterate link with the child_job, select the child_job, go to Component tab, add a parameter (the file parameter that you created before) and set the value to ((String)globalMap.get("tFileList_1_CURRENT_FILE")) and you are done!
Something like that:
I'm trying to process the Ctrl+Z ( Undo Delete ) context menu action in my namespace extension, but I'm having trouble finding a way to do this.
I see in the doc that one needs to implement FM_UNDELETE_PROC, but no details on how to register this callback.
Also tried to set a Shell hook, but no relevant messages arrive there.
Any thoughts?
Also, how would one register a delete operation so the explorer would allow the Undo to take place.
Now it appears if I do this from another location.
Thanks,
David
Windows has per process (prior to Vista) or global file operation stack. If you use API functions like SHFileOperation or IFileOperation interface you can pass FOF_ALLOWUNDO flag BUT this flag is ignored if the source file parameter does not contain fully qualified path and file names. It means if you want use system file operation stack your shell extension objects MUST have SFGAO_FILESYSTEM attribute and you MUST return valid file path and name when IShellFolder.GetDisplayNameOf is called with SHGDN_FORPARSING parameter. Also it is necessary to implement ITransferSource and ITransferDestination interfaces. So if objects don`t not have SFGAO_FILESYSTEM attribute you must use your own implementation of operation stack.
Undo Delete command in background context menu of folder or in Edit menu is system command and it has no any relation to your shell extension. And you should not process the Ctrl+Z manually.
In PowerDesigner v12, how would one, through use of VBScript, assign a TriggerTemplate to triggers that are missing the definition?
We have a script now that can loop through the triggers and display the triggertemplate (if it has one), but all attempts to assign a template to these triggers have failed.
Any insight would be greatly appreciated!
Can someone with power edit this and add 'powerdesigner' as a tag? I can't do it.
Thanks,
Calvin
I may have found an answer, but I want to get other input on it.
While I cannot get a reference to the TriggerTemplates that are part of the DBMS, the model itself can have its own TriggerTemplates. These model based templates can be referenced and assigned to the triggers as needed.
My thoughts were to actually create copies of the DBMS templates inside the model, and use those instead.
Thoughts?