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)
setValue-Replicant
System
Hi,
I have a item called DependentFiles with replicant.I want to set the value for item Name.I am doing like this
IWDatacapture.getItem("/DependentFiles/Name").setValue("test");
But it is not working.??
<item name="DependentFiles">
<label>DependentFiles</label>
<replicant min="1" max="999">
<item name="Path">
<browser ceiling-dir="/templatedata/General/" initial-dir="/templatedata/General/" size="30"/>
</item>
<item name="Name">
<text size="10">
</text>
</item>
</replicant>
</item>
Thanx in advance
Find more posts tagged with
Comments
JonathonG
You need to specify which instance of the replicant you are referring to. They are numbered starting at 1. If memory serves, the path to the first one, for your example, is:
/DependentFiles[1]/Name
Change the 1 to any other value to access various instances of the replicant.
Jonathon
Interwoven Architecture Consultant
Migrateduser
Thanx for your reply it works with
this
/DependentFiles[1]/Name.
If i have 10 replicants i need to set the value in ItemChange.In my example if i have 10 paths in first item i need set name automatically through onItemChange event.
Is it possible mentioned like below
/DependentFiles[1-99]/Name. or each time we need to specify replicant number.
Thanx in advance
JonathonG
I'm fairly certain that ranges don't work, so you'd have to put it in a loop. Something like:
for (i = 1; i <=10; i++)
{
var item = IWDatacapture.getItem("/DependentFiles[" + i + "]/Name");
// Do something with item.
}
Jonathon
Interwoven Architecture Consultant
mon
i have a container replicant. but setvalue
does not help for
IWDatacapture.getItem("/Submission_Documents[4]/File Residence").setValue(fullpt);
If the text field is out side the container replicant the setvalue works fine.
What can i do ??
JonathonG
Not real sure what the problem may be, here's a couple of thoughts.
Are there 5 instances of the replicant? Remember that the index is 0-based.
You might want to post your datacapture.cfg and javascript file (as attachments).
Also, be sure to include TS version/patch level and OS version/patch level
Jonathon
Independent Interwoven Contractor
Edited by JonathonG on 12/01/03 07:16 AM (server time).
mon
Using TS6... but solved the issue .
i used the set value for each instance with a loop.
but thank u.
However there is another question.
can u validate ur dct using the finish button vth formapi ??
if so how do u access the finish button ?
JonathonG
Haven't used 6.0 yet, so I'm not real sure. I would guess that the Finish button fires the onClose event, but that's really just a guess (albeit an educated one). If not, I would look at the 6.0 FormAPI documentation and see if there is an "onFinish" event or something like it.
Jonathon
Independent Interwoven Contractor
mon
yes it fires onclose . It checks out if the form is saved or not if not prompts us to save as and then closes off. but when i tried onclose handler it did not help.
JonathonG
What do you mean by "it did not help"? Your event handler didn't get called? or it didn't do what you wanted it to do? If its the second question, post a detailed description of what you want to accomplish, what you've tried, and how it failed. If its fhe first question, then I would say its one of two things: "Finish" doesn't fire the onClose event, or, more likeley, you didn't register your event handler correctly.
Jonathon
Independent Interwoven Contractor
mon
Hi jonathan,
Its the first case. no, i did regester the event properly. i checked it manytimes. So may be finish does not fire onclose event . Doing some more R&D on it. will let u know if something useful turns up.
I appreciate ur help. Thank You.
JonathonG
mon: Could you post your event-registration code and your event handler function?
Others: Anyone with TS6 experience know what event is fired whent the user clicks the "finish" button?
Jonathon
Independent Interwoven Contractor