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)
FormAPI and setValue problem
Digger
Hi,
I've attached the code I'm testing and it shouldn't be complicated but it ain't working for me, your insight of what's wrong would be appreciated.
What I'm trying to do
1. On event OnItemChange for Item (listBox) " /canadapost_content/content/IWSubElements/available_sections"
2.Insert text into this Item(Textarea)
/canadapost_content/content/IWSubElements/en_content_txt
Once you load the form you will see that there is a section call "content" , on that section the item is labelled "available section" (List box), if you change any of is values you'll see the pop-up showing up, but the textarea doesn't change???
What's missing...
Regards,
Michel
Find more posts tagged with
Comments
Valentine
looking at the datacapture.cfg you've got tons of hthe containers,
are these item's part of the container? Are you sure about the FormAPI path?
nipper
You have a whole lot of code there, however from what I can tell, you are not referencing the actual item:
var aItem =IWDatacapture.getItem("/canadapost_content/content/IWSubElements/en_content_txt");
IWSubElements is a replicant, 1-20. You need to specify which replicant you are changing.
That being said, you *should* be able to use the item that you are triggering off. Try parsing it.
Digger
Thx for the lead it worked.
I will do more reading on the replicants.
Just a last questions: is there an easy way to define the numbers of replicants that got created for a specific item on a specific DCR with formAPI.
Ex:
DCR1 as IWSubElements (20 replicants)
DCR2 as IWSubElements (5 replicants)
Regards,
Michel
nipper
Well that depends
if you have /dcr/Root/replicant/field1 and /dcr/Root/replicant/field2, then you can do something like this:
onItemChange "/dcr/Root/replicant/field1" run foo
function foo(item)
var field2name = item.getName()+"../field2";
so then you do not need to track the replicant #.
does that help ?
Digger
Yes it did, thx for the quick replied again.
Regards,
Michel