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)
list of workareas in a branch
mon
I need to get the list of workareas in a branch for an element in DCT. Can some one help ?
Find more posts tagged with
Comments
gzevin
run an inline callout with iwlist command
and.. RTFM
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
PageOfPagesInAStory55.ssd.zip
2345.pdf
mon
Tried to no avail
Adam Stoller
How are you attempting to run the command? Please show the *actual* code you're using - and provide samples of the values of any variables being used.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
to add to fish's comments:
try to run iwlist from the command line to see its behaviour. To get all workareas for a given branch, use something like
<iw-home>/bin/iwlist /default/main/mybranch/WORKAREA
it will give yo a list of workareas. Then you have to parse this to return an appropriate <substitution> XML back to the DCT
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
mon
I have managed to get the list of Workareas in an arry in the ipl file. but i am having trouble subtituting the values for a dropdown in the DCT.
gzevin
well, something like this:
print "<substitution>\n";
print "<option value=\"\" label=\"\" />\n";
foreach my $wa (
@worareas)
{
my $value = $wa;
my $label = $wa;
print "<option value=\"$value\" label=\"$label\" />\n";
}
print "</substitution>\n";
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
mon
Thanx a ton. It works fatastically. One more query though. Can u please tell me how do i get the path of current branch in the ipl file ??
Platform Export Configuration.png
Print Preview output connector.png
gzevin
well, I don't exactly understand what do you mean. .ipl as such is a perl file, it depends on how do you invoke it and where do you invoke it. E,g, if .ipl is an external task it's one thing, etc etc...
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
mon
i am calling the ipl file as an inline command.
gzevin
it's not that I don't want to help you, but have you tried to read manuals?
this is a quote from the manual:
-----------------------------------------------------------------
When a server-side inline callout program is executed, it inherits the following environment
variables:
• IW_DCT: The file system path to the datacapture.cfg in use (for example, /iwmnt/
default/main/development/WORKAREA/maudlin/templatedata/press/events/
datacapture.cfg).
• IW_ROLE: The role of the current data capture user (for example, editor).
• IW_USER: The full user name of the current templating user (for example, andre).
• IW_WORKAREA: The vpath to the current workarea (for example, /default/main/
development/WORKAREA/chris).
----------------------------------------------------------------
$ENV{IW_WORKAREA} is what you want, trim it a bit and you'll be apples
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Test for David.zip
mon
I got this one sometime before.
I posted and then started to search in the manulsa. sorry for the trouble and thank u again.