This content has been marked as final. Show 4 replies
There is a function in the Object Browser for deleting mapping tables: API.SQLUpdateMgr.fDataMapDelete(strLoc, strDimName, blnDeleteEntireMap)
I tried various different methods to try and get that API to work in a Custom Web script, but I continue to get an error that says: Cannot use parentheses when calling a Sub. I'm very new to this, so I apoogize if this is a mundane question. Just trying to get this going. The user is looking for a way to pull their mappings from a SQL table, which I accomplished, but all maps for the dimension need to be deleted first, otherwise I get errors for duplicate values.
Sorry, I copied the code directly from the Object Browser. The parentheses are not necessary for this subroutine. The format should be like this:1 person found this helpful
API.SQLUpdateMgr.fDataMapDelete "NorthAmerica", "Entity", False
where "NlorthAmerica" is the location storing the map that you want to delete and "Entity" is the name of the dimension whose mapping table you want to delete. False indicates that you don't want to delete all of the dimension mapping tables for North America, just the Entity mapping table. Change this parameter to True if you indeed want to delete all mapping tables for the given location.
Certain objects and their associated functions, subroutines, properties, etc., will not work in all script types. It may be the case that fDataMapDelete does not work in Custom Web scripts. I know that it works in Event scripts.
The Object Browser in the FDM Workbench script editor is a good scripting reference and it is searchable. To search it, right click on the topmost folder and choose Search. Type in all or part of an object, function, or property name and hit OK. Scroll through the list to find the highlighted function, property, etc. that looks like it will work, click on it and you get the info on the item in the description window.
The Accelerators in the Object Browser will copy entire snippets of code that you can use to carry out specific tasks.
The API Guide explains all of this in more detail:
Thank you so much! That worked like a charm. I appreciate all of your help.