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)
dynamically adding items to a dct.
System
Hi,
I am faced with a requirement for which i am unable to work out a POC. I have a dct wherein i fill in some values say
feature name (text box) : infra red
control type (select) : radio button/text box
these two items are in a replicant.
Now in a second dct of different type i have a browse button from where i choose dcr of the first type. After selection the second data capture form should show me the above feature name and either radio buttons or a text box according to the selection made in the first dct.
1) I thought of including an inline callout but it won't help here as inline callouts are made on form initiation, whereas the above should happen on an itemchange event.
2) If i am able to pass a variable through inline callout, then i might achieve it but i am unable to find a way to pass a js variable thru inline callout. Is this possible?
I am working on TS 5.5.
Thanks and Regards
dixit
Find more posts tagged with
Comments
kaalraa
Could not get your query clearly....as in subject line you have asked to add the items dynamically and in your solution you have used the Inline commands.
Please clarify. Moreover if you want to add items then read more about using child DCTs which can be called on dynamically within the parent DCT. Still telling you i have not ever used that... but just read something on that.
- AKs.... The Shadow
Adam Stoller
About the only way I could see this working would be if you define a text box and an OR container within your "second" DCT and use FormAPI to have those fields hidden by default, then check the contents of the field where you do the other DCR selection (which should also have an onItemChange event handler on it) to see if there is a value there.
If / when a value is placed there, use something like a CallServer script to parse the selected DCR to determine the information and then make FormAPI calls to un-hide the fields you want (I'm not sure about the OR container - I'm guessing that you are trying to dynamically determine what kinds of fields to add to the "parent" DCR via selection of the "child" DCR - but that's a rough guess)
Forget the inline idea - as you noted, that only works at the point in time of constructing the DCT to be rendered and happens too early for you to be able to make use of it when you dynamically select something.
I have a feeling that this will still be a rather complex piece of work to do - you might want to make sure that this entire idea of selecting one DCR of type-A to control aspects of another DCR of type-B is really what you want/need to do.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
IwovHeather
Hi,
I just wanted to make sure that you knew that we have ended support for TeamSite 5.5.2. You should consider upgrading as soon as possible in order to remain on a supported platform.
Thanks,
Heather
Migrateduser
Hi ghoti,
Thats exactly what was required and as u said it is rather very complex peice of work. The approach you have suggested works fine if you have to hide unhide 10-15 items, but in my case i will be dealing with atleast 500 items. So this is also ruled out. I think i will take the conventional approach of a CGI CALLOUT instead of adding fields to the DCT, i'll have them filled in a CGI.
Thanks a lot for the suggestions.
Regards
dixit