Hi,We generally browse the content from datacapture through...But in this way we can browse contents from the same workarea.. can we browse contents available in some other workarea.. ??Thanks & Regards,Nitesh Ambuj
Hi,We generally browse the content from datacapture through...<browser extns="htm" initial-dir="/im_global" size="40" required="t"></browser>But in this way we can browse contents from the same workarea.. can we browse contents available in some other workarea.. ??Thanks & Regards,Nitesh Ambuj
[thread=14049]Cross Branch file browser[/thread]
Hopefully This Piece of Info will Help you.Step 1 :[html]Other File Browse Other WA File.[/html]Step 2 :Register the Event on Call Out Item for "Browse" Button..[html]/*Event registry to browse File*/IWEventRegistry.addItemHandler("/core_product_details/core_product","onCallout",openBrowseWindow);[/html]Step 3:Call this Function[html]/******************************************************************************************************** Purpose : A function to call popup of dcr selection(Product Core) Parameters : Item button Returns : N/A Author : James Bond Date : 10-Aug-2006 Revision History********************************************************************************************************/function openBrowseWindow(button){ var workArea; var ceilingDir; var buttonName = button.getName(); var buttonArray = buttonName.split("/"); var itemName = buttonArray[buttonArray.length-1]; // This is a Global Item Name of Item caling Browse Function globalItemName = itemName; // Where coreProductBranchPath is the Core Branch WA Path. if (globalItemName == "core_product"){ ceilingDir = coreProductBranchPath+"/templatedata/Content/ProductCore/data"; globalItemName = buttonName; } //Set the Celing the DIR to Obsolte Path of DCR data folder var url = "/iw-cc/command/iw.formspub.browse_for_link?vpath="+ceilingDir+"&ceiling="+ceilingDir+"&hier_callback=eval(callback_81=function(path){opener.parent.getScriptFrame()._doBrowseCallback(path)})&show_thumbnail=true"; window.open(url,"","resizable=yes,width=500,height=400");}[/html]Step 4:[html]// Use this Function which returns the Obsolute Path of the DCR Browsed./******************************************************************************************************** Purpose : Callback function from openBrowseWindow fucntion Parameters : Selected DCR path Returns : N/A Author : James Bond Date : 10-Aug-2006 Revision History********************************************************************************************************/function _doBrowseCallback(filePath){ var pathArray = globalItemName.split("/"); var lastName = pathArray[pathArray.length-1]; // U can Omit this Part.. Use Else Part only.. if (lastName == "core_product"){ var filePath = new String(filePath); var oldPath = filePath; var pathArray = new Array(); pathArray = filePath.split("/"); var newPathArray = new Array(); var index = 0; for (var ind = 3;ind < pathArray.length;ind++){ newPathArray[index++] = pathArray[ind]; } filePath = newPathArray.join("/"); filePath = "/"+filePath; absPath = filePath; coreBrowseFlag = 1; /*Value of Product core is set in checkngPDB function as Core details page need to update*/ IWDatacapture.callServer("/iw-bin/getngPDB.ipl?abs_path="+oldPath); }else{ /*This is additional code for browse of other item which will have callout button Here this code is not used*/ var filePath = new String(filePath); var oldPath = filePath; filePath = filePath.replace(/.*\b((WORKAREA|EDITION)[\\\/][^\\\/]*|STAGING\b)/, ""); IWDatacapture.getItem(globalItemName).setValue(filePath);; }}[/html]