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)
Retuning all values from DCR list
christinelewis
I am creating a list of values that a user can select using a perl script that goes to another DCR to get the values.
I have some logic in my TPL that looks to see if there was a value selected and if not I want to create a list of all available values, i.e., if a user doesn't select a country then the TPL would go to the DCR and return a list of all of the countries.
Can't get it to work, any help appreciated.
Thanks!
Find more posts tagged with
Comments
Adam Stoller
I'm a bit confused by your description. If you have, for example, 5 countries listed in this "external" DCR, and a user does NOT select any of them while editing the "primary" DCR - you want the PT for the "primary" DCR to list all 5 countries in the generated page?
If so - the code you used to get the list in the first place should be roughly what you need in the second place - and it would probably help us to help you if you supplied (as an attachment) the Perl code you are using in the first place, the PT and the "external" DCT...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
christinelewis
I'm using an inline command to generate the list on the DCR (<inline command="/apps/interwoven/iw-home/iw-perl/bin/iwperl /apps/interwoven/iw-home/local/bin/bgi/get_list_items.ipl NameofFile"/>). The perl was created by a consultant, and I was thinking there should be an easier way to get the list of values returned on the TPL.
I'll attach the file.
Thanks!
Capture.JPG
Result.JPG
Adam Stoller
If you write your PT as Perl code - the same code could probably be used - as you need to parse the "external" DCR (or it's DCT) in order to retrieve all the possible settings. I'd look at something like TeamSite::XMLnode or TeamSite:
CRnode as modules to use for parsing the DCT or DCR.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Jens
You can use <iw_load_dcr> to load the "second"-DCR if there is no selection in the first one
and iterate (if the values are in a replicant) through it.
See
http://TS-SERVER/iw/help/tst/pt/TeamSite__PT__iw_load_dcr.html
Ciao,
Jens