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)
Counter for number of replicants?
System
Hi,
In a PT I want to know the number of replicants in a container. Is there a variable with the value or do I need to manually iterate over the container counting the replicants?
Brgds, Håkan
Hakan
Find more posts tagged with
Comments
Adam Stoller
If you're using something like iwpt_dcr_list(accessor) [where accessor is, I believe, something like 'dcr.replicantName.*') - then you should be able to put the results into an array and use: scalar(
@array)
to get the number of replicants within.
I don't have time [or network bandwidth] right now to try this out and provide a true code example, but hopefully the above will get you moving in the right direction.
If you don't want to use Perl code - then yes, you'll probably have to iterate through all the replicants and create your own counter.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Hi,
Thanks for your input. This is an example that worked for me:
<iw_perl>
<![CDATA[
my
@list
= iwpt_dcr_list('dcr.paragraphsContainer.Paragraphs');
my $counter = scalar(
@list)
;
iwpt_output($counter);
]]>
</iw_perl>
Brgds,
Hakan