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)
To read contents of a Replicant using Form API's
Mohan_Babu
I have problem's in reading the contents of a replicant item in a DCR..., i am using FORM API's for these..
there is replicant item called AB/AB[100], i have created 5 replicant's in the DCR and when i save the DCR, i am trying get the value and evaluate the value and do some operation on the value,
the while condition below in the code works fine for the first 5 values, since there are 5 replicant's in the DCR, when the while loop is executed for the six time is hangs in the while loop, i mean it doesn't comes out of the while loop, since there is no six replicant in the DCR, it tries to get the value of an item which is not there in the DCR..
Is there any way that i can get the values of only the replicant's which are in the DCR, i mean only the no of replicant items in the DCR ..
I am using TS 5.5.2
var count = 1;
while( IWDatacapture.getItem("/AB/AB["+count+"]/logo").getValue() )
{
var path=IWDatacapture.getItem("/AB/AB["+count+"]/logo").getValue();
var imagetype=path.slice(path.lastIndexOf(".")+1, path.length );
if (imagetype=="jpg"||imagetype=="gif")
{
}
else
{
alert("Please Select/Enter the image which is in JPG or GIF Format only");
ret_val = 1;
break;
}
count++;
}
alert("test");
eval(alert(ret_val));
if (ret_val == 0)
{
eval(alert(ret_val));
return true;
}
else
{
eval(alert(ret_val));
return false;
}
break;
Thanks
Mohan
Find more posts tagged with
Comments
Migrateduser
Please be aware you are working on a product that has reached end-of-life. Please consider an upgrade plan.
Replicant behavior is MUCH more flexibible in TS 6.5.
Regards,
lissa
jbonifaci
RTFM on getChildren().
~Jeff
Mohan_Babu
Hi Jeff,
If you don't mind, Could you please elobrate on these RTFM on getChildren().
Thanks and Regards
Mohan
jbonifaci
There is no need to guess how many instances of the replicant there are, getChildren will return an array of all instances. Go read the user manuals to find out how to use it.
~Jeff
linechart_curve.rptdesign
Mohan_Babu
Thanks a lot jeff, i tried it and worked fine...
Thanks
Mohan