Hi,
I'm having a little trouble with an inline and wondered if anyone had any thoughts...
I've stripped it down to a basic script that calls the iwgroup CLT, splits the group name out of the results and either writes each one as a separate <option> tag or, if no groups were found displays an <option> tag with an error message.
Log in to server as Administrator and run from the command line and... everything works as expected and a substitution block with all the TeamSite groups is written to screen.
Log in to TeamSite as Administrator and view a DCT that contains the inline (technically I'm using it in a Workflow Modler custom configuration page but these are just DCTs and I get the same results plugging it in to a traditional data-type/Form) and it's a different story. The inline still runs without errors but the error <option> is displayed.
I've tried everything I can think of, including giving 'Everyone' full control of both inline and the iwgroup CLT and nothing makes any difference.
Has anyone got this working/know why it won't work?
Thanks,
mstradling
Platform:TeamSite 6.7.1 SP1/Win.
Inline \local\bin\inline.ipl
#!C:\iw\teamSite\iw-perl\bin\iwperl.exe
use strict;
use TeamSite::Config;
my $IW_HOME = TeamSite::Config::iwgethome();
my $cmdIWGroup = "\\bin\\iwgroup";
my $paramsGetGroupList = " list-groups ";
my $argsGetGroupList = " -a";
my %approvalGroups = ();
# Get list of Groups
my $cmdGetGroupList = $IW_HOME . $cmdIWGroup . $paramsGetGroupList . $argsGetGroupList;
my @cmdGetGroupListResults = `$cmdGetGroupList`;
# Loop through list of groups looking for any approval groups
foreach my $IWGroup (@cmdGetGroupListResults) {
$approvalGroups{$IWGroup} = $IWGroup;
}
print qq(<?xml version="1.0" encoding="UTF-8"?>\n);
print qq(<substitution>\n);
# Start with the group select list
print qq( <select required="f">\n);
if (keys %approvalGroups) {
foreach my $group (keys %approvalGroups) {
print qq( <option value="1" label=");
print $group;
print qq("/>);
}
} else {
print qq( <option value="0" label="Error: No groups found!" selected="t"/>\n);
print qq( <option value="1" label=");
print scalar(@cmdGetGroupListResults);
print qq("/>\n);
}
print qq( </select>\n);
print qq(</substitution>);
Inline Call:<inline command="C:\teamSite\iw-perl\bin\iwperl.exe C:\teamSite\local\bin\inline.ipl"/>
Command Line Result:<?xml version="1.0" encoding="UTF-8"?>
<substitution>
<select required="f">
<option value="1" label="Group_A"/>
<option value="1" label="Group_B"/>
<option value="1" label="Group_C"/>
</select>
</substitution>
DCT Result<?xml version="1.0" encoding="UTF-8"?>
<substitution>
<select required="f">
<option value="0" label="Error: No groups found!"/>
<option value="1" label="0"/>
</select>
</substitution>