Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
WF:Unable to access mutli select list box values
Tej
As part of the requirement, we need to capture multiple countries in the job initiation form of the workflow. We don't have issues in creating multi select list box. But we are not able to access the countries selected by the user in the workflow template script.
Find more posts tagged with
Comments
Migrateduser
You need to take the selected values, jam them into a delimited string and pass that string to your script, then split out the values in your script. Currently, that is the only way to do it, although the documentation implies wft supports multiple select lists.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Tej
If the user selects only one value, no issues. If the user selects multiple values, we get ARRAY(x20d0d), when we try to access using TAG directive. Is there any other way to access multi select list box control in the wft file?
Migrateduser
Try something like this:
my $reviewers = '';
for (my $i=0; $i<__ELEM__('reviewer'); ++$i) {
$reviewers .= "__TAG__('reviewer[$i]');" . ",";
}
chop $reviewers;
The pass the $reviewers variable to the script.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Tej
Hello Smitty,
Thanks for the solution. It is working as expected.
- Tej
Adam Stoller
I can't test this right now - but I believe __ELEM__() behaves differently depending on the context in which it is used (scalar vs. array) - and you might be able to achieve the same functionality with something like:
my $reviewers = join(",", __ELEM__('reviewer'));
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
I never actually tried the code I posted, but it was sent to me by one of the really good Interwoven Support guys who always seems to come up with the right answer.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
ProfessorX
Tried it...It don't work
The Professor-
Adam Stoller
My appologies - it was __VALUE__() that handles arrays correctly.
So instead of:
my $reviewers = join(",", __ELEM__('reviewer'));
try:
my $reviewers = join(",", __VALUE__('reviewer'));
Sorry about that, this time I actually tested it out ;-)
--fish
(Interwoven Senior Technical Consultant)