I am trying to autoname the DCR on click of save button in the DCR. I use a value from the text field to create a name. I use IWDCRInfo.setDCRName(dcrName); in the formAPI and its working fine. The new DCR gets created in DATA directory.Sometimes, user wants to save the DCR in to a folder within DATA directory. Can I determine the directory where he choose to go to File menu and select the New Form Entry? How do I go about doing it?
Nipper, I did not really understand "we use a select list (of the sitemap) to name the DCR", pls elaborate.Thanks for the response..
kaalraa,Its NOT mandatory for the user to initiate a New Form Entry from the same folder where he wants to save the DCR. But, if I can figure out the way to find out the folder where he intiated a new form entry, I can ask them to dig in to the folder and then do the new form entry!
a) My suggestion towards solution would be to ask them explicitly in DCT as a drop down where they need to store the file. b) I am sure this input they must have before initiating a new form entry.
Without commenting on the merits of this approach, please note that a) and b) above are mutually exclusive
Hi,I have a similar issue to solve. I am using auto dcr functionality to generate name of a DCR, but I need to save it in a folder inside data folder. This folder will always exist, but I am not sure when we use auto dcr functionality how can I save DCR in a folder inside data folder. Any pointers?Thanks
Hi,Thanks for the suggestion ghoti. Sometimes if the subfolder inside data folder does not exist then I use callServer which in turn executes a perl script and creates the folder. But the issue is callServer is asynchronous call so even though folder gets created I am not able to save the DCR in there because setting the DCR name gets executed while the folder is still getting created.Here is the sample code:IWDatacapture.callServer("http://"+server+":"+port+"/iw-bin/iw_cgi_wrapper.cgi/createDir.ipl",nameParams, true); var DCRName = region + "/" + ctyhocnValue + '/' + ctyhocnValue + '_' + contentType + '.dcr'; //setTimeout(assignDCRName(DCRName), 10000); IWDCRInfo.setDCRName(DCRName); return DCRName;How do i make sure that IWDCRInfo.setDCRName(DCRName); return DCRName; executes after the subfolder is created.Please help.Thanks alot.