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)
Modify dummy task with timeout
myr
I'm trying to modify one of my teamsite workflows to deploy files based on the "date" and "time" variables that a content editor enters in the workflow. Currently I have it working when the user enters the number of days until deployment and this variable is passed as a timeout to a dummy task before deployment. (see below) What's the best way to modify the $timeout to accept two variables based on date/time? Thanks.
# Set some variables for later use
my($timeout) = sprintf ("+%04d00", (24 * __VALUE__('delay')));
..........................
TAG_info(
delay =>
[ html => "<textarea rows='5' cols='40'></textarea>",
label => "# of days to deployment",
valid_input => '/^\d*$/',
error_msg => 'Please enter a number of days to deployment',
],
Find more posts tagged with
Comments
Adam Stoller
You might want to look at Date::Manip - and allow users to enter in date and time information in a fairly free-form manner and then translate it into the +HHHHMM or MMDDYYYYHHMM format.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
myr
Thanks for the feedback. I ended up using another approach:
# Set some variables for later use
my $timeout = __VALUE__('duedate'); #changed timeout to equal due date value
$timeout =~ s|/||g; #regex removes the forward slash between month/day/year
$timeout = $timeout."0859"; #regex adds time to the end of the string - 8:59 am
.......................................
TAG_info(
duedate =>
[ html => "<input type='text' value='MM/DD/YYYY'>\n",
label => "date of deployment",
error_msg => 'Please enter a date for deployment',
Biswarup
Hi,
I went through your posting; am having a similar scenario, so could you pelase guide me how to design a workflow for the same.
Thank You.
Regards,
Biswarup Mohanty.
jbonifaci
As Adam said, have your users enter date and/or time in whatever format you think is most user friendly. Then behind the scenes translate the timeout value to either the +HHHHMM or MMDDYYYYHHMM format for the timeout.
~Jeff