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)
DCR or ofile name from within a DCT inline script
Lee
How can i get the DCR name or generated file name (ofile)from within a script ran from a DCT inline command.
For historical reasons we must use the java templating client. FormAPI is therefore not available to us.
Pretty desperate on this one any help would be really appreciated.
Lee C
Find more posts tagged with
Comments
Migrateduser
Hi,
Getting the DCR name in a DCT inline command is not possible even in the Classic CGI Templating, since the inline gets executed just before loading the DCT. (and I think same with the generated filename).
I have not worked a lot with java templating. But if it is not possible with classic templating, it would be difficult in java templating, if at all possible.
By the way, what is the DCR name used for, in the inline ?
Lee
The file path to either the dcr or the generated file has meaning. that is the content is structured into directories by country. I want to be able to inline extra oprion elements based on country....
If thier is another way I'd gladly do it
lee C
Lee
I've tried (rather desperatly) to find the name of the file being edited by looking in the iwevents.log. Sure enough it looked sort of promising. hoever only lock events seem to get logged. if the user edits a file they have a lock on, no event gets logged. Is their a file which does log file edits ?
Lee C
JonathonG
The only events that get logged for edit are Create/Modify FSE events. But these would only get logged (assuming you have them turned on in iw.cfg) at *save* time, not file open time. So, I don't think that iwevents is going to be able to help you much. As a workaround (until you can move to the browser-based UI), you could add a callout button that sets the options you want. The users would have to click that button, which isn't as nice as inlines, but it would at least work.
Just a suggestion,
Jonathon
Independent Interwoven Contractor
iwovGraduate
As suggested by JonathanG you can write a callout.
Just a personal opinion - I wouldn't spend any time/efforts on customizing Java Templating UI. IWOV has already announced End-of-life for it. Upgrade and use the newer and nicer features such as FormAPI.
parsan99
Hi
Do you have an option of using workflows?. We have a similar situation and what we did was to collect the file name in the workflow, create a skeleton DCR and fill in the fields with the necessary information. This is all done in an external task which is followed by a CGI task that opens up the DCR for editing.
Hope this helps.
gzevin
Just think about it - DCT inline executes BEFORE loading the form as such, so it cannot possibly have any knowldge of a DCR.
unless you use some other tchniques that have been already suggested (running via a workflow, etc), I am afraid you are going to hit a brick wall.
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU