Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
dcrname
getnaren
when I set dcr-autonaming="t" it generates this iwDCR0_301221, is there a way we can automate it to get the date from the dcr and generate the name
for expamle 2005nov30
Find more posts tagged with
Comments
Migrateduser
It's in the manual -- you'll want to use FormPI, specifically IWDCRInfo.setDCRName('2005nov30'), for instance.
Dave
Environments:
(1,2) TS6.5, TS6.5SP1 on W2K3
(3) Vignette V7 Portal on Solaris 9
getnaren
dave,
thnaks for ur directions. I used the form api code and when I try to save the dcr, it throws up a warning window and it says
Save was unsuccessful. Invalid category/type null was received.
and on the status bar javascript error says Can't execute code from a freed script"
here is the attachement, and I am calling it like this in datacapture.cfg
<script src="/iw/userscript/autoname_dcr.js"/>
in the js file its not likeing
var d = IWDatacapture.getItem("/date"); from dcr
if I put var d = new Date();
it works fine..any clues?
cliffhanger
var d = IWDatacapture.getItem("/date");
You probably meant to do
var d = IWDatacapture.getItem("/date")
.getValue()
;
here.
Still that'd give you error because then "d" would be a mere string. I would guess this is what you're looking for:
var d= new Date(IWDatacapture.getItem("/date").getValue());
You can access the valid date functions from "d" only if it's of type Date.
-cliff
getnaren
I used that also still it throws
Save was unsuccessful. Invalid category/type null was received.
when I save
here is the attachement I have put the script in the dct for testing
TS 6.5, on solaris
Nidhi_Agrawal
Oh, u forget to include the name of root-container and containers.
use this..
var d= new Date(IWDatacapture.getItem("/pressreleases/pressbody/date").getValue());
Nidhi...
getnaren
thank you Nidhi.