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)
Calendar in WorkFlow Template
philipcz
When I do a New Job for a work flow I would like to add a Calendar option to the workflow Template. Sorta Like a call out. I was wondering if anyone has added a calendar to the Work flow Template so that a usr can select a due date before the workflow starts.
Thanks
Phil Czajkowski
Find more posts tagged with
Comments
nipper
sure.
it is easy
my $cCalendar = "<input type='text' size='15' value='$defaultDate' /> <a href='/iw-bin/wf_calendar.ipl' target='_new'>Calendar</a>";
my $uDeployAtDate = __VALUE__('uDeployAtDate');
my $uDeployAtTime = __VALUE__('uDeployAtTime');
In the TAG info section
uDeployAtDate => [html => "$cCalendar", is_required => 'true', label => "Delayed Deployment Date", valid_input => '/^\d{2}\/\d{2}\/\d{4}$/', error_msg => 'Please enter Delayed Deployment Date in proper format (MM/DD/YYYY)',],
Andy
philipcz
Thanks Andy
All that make sense, put I have one small issue. I just did a search on my server, and I do not have iw_calendar.ipl
could I ask a favor, can you send me the script at
phil@quotient-inc.com
I would really appreciate it
Thanks In advance
Phil Czajkowski
iwovGraduate
What version of TS do you have ?
There is a calendar_YYYYMMDD.ipl shipped with TS 6.x
I think this is a part of "Sample content" available on the support site for TS 6.0.
nipper
For 5.5.2 I think it is a tech note. See if you can find it.
It is the same code as is used in templates.
Andy
philipcz
I found it here:
CGI Calendar
Knowledge Base Article: 48813
Type: Tech Note
Synopsis
Details
The cgi calandar is a script to use in a data capture template to populate text fields with a user-selected date. The current date is pre-selected by default.
Attachments:
Calendar1.1.zip
it is called z_calendar.ipl
philipcz
Well I got the calendar to come up, but when I click on a date I get this message:
Fatal Callout error. Did you close the Data capture window
Phil
philipcz
Andy:
Well I got the calendar to come up, but when I click on a date I get this message:
Fatal Callout error. Did you close the Data capture window
Phil
lhdavis
You'll probably have to make some changes to this calander script as it was intended for use with data capture templates (hence the error message) rather than workflow. Without looking at the perl script, it probably has hardcoded paths to return it's value to the data capture template.
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov
nipper
The code fragments I sent were from a WF.
Are you certain the callout is executing properly ? It does not sound as if it started
philipcz
I think Luke is correct, I looked at the z_calendar code , and it points to datacapture stuff.
Yes the calendar comes up correctly, but the issue in the below function. This function is not setting or seeing the the element on the parent window
I have a working knowledge of javascript, and it is going to take me a little extra time to figure this out. Up until this function all is working great.
If I could have a peak st your wf_calender.ipl. This would speed up my troubleshooting time by 10 fold.
function set_datacapture_item_value( selectedValue )
{
if ((window.opener == null) ||
(window.opener.closed))
{
return false;
}
var calloutForm = eval($form_name);
if (!calloutForm)
{
return false;
}
var calloutElementFound = false;
for ( i = 0 ; i < calloutForm.elements.length ; i++ )
{
if (calloutForm.elements
.name == '$element_name')
{
calloutForm.elements
.value = selectedValue;
calloutElementFound = true;
break;
}
}
if (!calloutElementFound)
{
return false;
}
return true;
}
Thanks
Phil
phil@quotient-inc.com
philipcz
After much reading, and after much troubleshooting, I got it to work. Luke was right, I had to make some charges to the how the window.opener id referenced in the script. By giving the form name and the element name to windows.opener, I now write back to the parent form.
Thanks for the code snippets
Phil Czajkowski
phil@quotient-inc.com
tempnick
I just checked my Win iw-home 6.1 and couldn't find it either. Could this be a Solaris only goodie?
Are you sure you didn't code up /iw-bin/wf_calendar.ipl in your sleep or just plain forgot how it got there?
No biggee... just thought I'd throw it into a demo for tomorrow.
-temp
Migrateduser
Perhaps you are looking for KB article
48813
.
Brinko Kobrin
Interwoven Staff Engineer
syim
Hi Phil,
Would you mind to share you solution? How do I modify the wf_calendar.ipl to set the value back to the element on the parent window?
Thanks,
Susan
philipcz
Hello Susan
This is my e-mail address
phil@quotient-inc.com
.
Send me you e-mail address and a contact phone number, and I'll send you my files amd help yopu set this up
Phil Czajkowski
syim
Hi Phil,
Thank you very much. It works
Susan
philipcz
That is great.
tempnick
For Consistency's Sake (if using the referenced calendar in a DCT and would like to use the same calendar in a workflow)... has IWOV or anyone else adapted this to work in a workflow startup form?
dlukezic
Hi Andy! I was wondering, would you be able to send me your wf_calendar.ipl script please?
Thanks!
Doreen
dlukezic@ca.ibm.com
gzevin
can I get the same calendar as well?
greg@ipksolutions.com
thanks
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
iwovGraduate
Can I get this calendar ?
unadkat@gmail.com
TIA
DavidMusser
I have this working now, but in your example you give the target=_new so I have nasty little scrollbars and the browsers toolbars etc.
I am able to re-size on load, and also get rid of the scoll bars in the body, but I still can't turn off the toolbars. Is there a different way to open the window from this screen that gets rid of those? I tried a window.open, but could not get that to work.
my $cCalendar = "<input type='text' size='15' value='$defaultDate' /> <a href='/iw-bin/wf_calendar.ipl' target='_new'>Calendar</a>";
Michael
Hi David
window.open is probably your best bet for that sort of functionality. Perhaps if you post up what you have tried we might be able to spot something?
Cheers
Michael
DavidMusser
All working now! I went back to the basics... made sure I could get onClick=alert('foo') to work first
then expanded from there. I think before I had too many "" or something... anyway I am attaching my wft, and ipl. This IPL requires the calendar from
http://www.dynarch.com/projects/calendar/
.
I am just using this with the configurable_author_assignment wft, so replace the wft in your solutions directory.
Plase the .ipl in the iw-home/httpd/iw-bin directory, and as I said download the dynarch javascript calendar.
I am not sure I like the way I'm calling back to the form, but in order to make the ipl so that i could use it for more than just due date I have it passing in the formname and fieldname in the url. If anyone improves on this let me know.
Thanks all.