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)
datacapture.cfg for metadata and formapi TS 552
System
Should formapi work with the set metadata screen on TS 552? I've tested out my datacapture.cfg and formapi javascript file using the File-New Data Record menu item and the formapi functions work okay. But when I move the datacapture.cfg to the location used by the set metadata screen, the formapi stuff doesn't work. All I'm really trying to do is if a certain checkbox is checked on the metadata screen, make a couple metadata fields not required. Any ideas or suggestions would be greatly appreciated.
Find more posts tagged with
Comments
iwovGraduate
As far as I know, FormAPI is not supported in MetaData Capture.
Adam Stoller
Correct - FormAPI is *not* supported for MDC - at least until TS6, where I'm less sure because according to the documentation the MDC uses datacapture6.0.dtd which *does* indicate that <script> is an allowed tag.
Can anyone confirm whether [or not] FormAPI works in MDC in TS6 ?
Can anyone confirm whether [or not] FormAPI works in MDC in TS5 with MetaTagger ?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
iwovGraduate
FormAPI is NOT supported in TS 6.0. Not sure about 6.1.
gzevin
I would wonder if it was supported, as metadata capture and templating are unfortunately two different beasts by their own....
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Migrateduser
Does anyone have any update for this? Does TS6.1 allow the MDC datacapture.cfg use FormApi or any functionality where we can do field dependancies (Selection of one field determines the options of another field).
TIA,
Mukesh
Adam Stoller
Nope - and it gets worse - cgi-callouts on the MDC form have access to all the *values* on the form, but only have access to the *name* of the field associated with the callout - which means you can't do any cross-field validation or manipualtion via cgi-callouts in 6.{0,1} MDC either ... and ... the cgi-callout doesn't have access to the path / name of the file being tagged either - which means you can't do any behind-the-scenes work via accessing the file being tagged from your callout.
There's a Feature Request (# 46736) regarding some aspects of this - which you may want to contact support to get your organization's name associated with too. I have a support case open regarding all of this as well (in my opinion this is a BUG because it breaks backwards compatibility - but thus far Interwoven's claim has been that this is a Feature Request since MetaTagger UI [which replaced the old OOTB MDC UI] never supported this functionality - sigh)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
Thanks, and I'll give a shout to IW support and add our Client to the list for the FR.
Can you please explain or point me to any documentation on how we can access the values of all the fields on the MDC form? Is there also a way to allow cgi-callouts to populate the form field on the MDC that the callout is executed from since the name is available to the cgi script?
Thanks again for your response ,
Mukesh
gzevin
yes there is a way to populate a field from a callout. I one parrallel topic I have just confirmed how this could be done
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Migrateduser
I think u can access all the field values of the dcr from the CGI callout using DOM and hence we can validate/modify any field we want to. The only problem with CGI-Callout is, it is invoked if u click on the callout button. so it is a clumsy solution for validation. But for MDC I think you don't have any better option. Templating developers guide gives an example of how to write an callout.
-koti
TechAspect
Adam Stoller
I said you can access the *values* - but performing validation or cross-field manipulation is very difficult (at best) if you cannot also access the field *names* - and that's missing in 6.x right now - all the field names are represented as "propxxxx" and I, for one, don't want to try and figure out how to map propxxx to field names in a DCT form since it is unclear that I would come up with a perfect algorithm and that the underlying structure won't get changed in a patch or service pack (or upgrade).
You can do all of this in TST DCTs without this problem - it's only callouts in the MDC DCT that has this problem.
I'm more than willing to be shown I'm wrong - and that all this is possible in the MDC DCT (heck, it would make it possible for my customer to upgrade sooner) - but I'm skeptical that you can. Adding FormAPI to the MDC DCT would certainly be nice and alleviate some, if not all, of these issues for me - but I'd still like to have more access to the information from within a cgi-callout script.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Adam Stoller
Are you talking about populating the field associated with the callout - or populating *another* field, other than the one associated with the callout -- in 6.x? I'd be interested in seeing how you did this - like do you depend on something that's specific to your environment or is the code general enough that it could be used by anyone?
(in 5.x manipulating multiple fields from a single callout *is* possible - it's 6.x I'm whining about ;-)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
Hi, Thanks for the replies.
Greg: whichever method this (meaning, populating the callout field itself or another field) is, can you please share it or atleast point us to documentation/articles that explain the steps.
Our requirements would like to populate another field, but if I can get it to populate the field from which the callout is associated, that would work.
Ghoti: You said that this could be done in 5.x, can you please provide me some guidance on how to achieve that using MT.
Thanks a bunch!
Mukesh
gzevin
I am talking about populating the field that has *called' the callout - I have not played with the other fields, but probably this still could be done
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
gzevin
heh.. what documentation are you talking about?
it's not documented anywhere...just in the forums..
well, read
this
thread..
probably, one more techlib article is needed?
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Adam Stoller
It's semi-documented - in that if you look at the TeamSite Templating Developer's Guide Release 5.5.2, page 101 - you'll see a function called set_datacapture_item_value(selectedValue) defined there - and part of that function uses a loop to rujn through all the element names in the form attempting to find the one that machines the element_name associated with the callout. That exact same loop mechansim (or perhaps something better) can be used [in 5.5.2] to access ALL the elementes in the MDC DCT form by name; and then get/set the value associated with that field name.
In 6.1 you only have access to the values - because the field names are all represented as 'propxxxx' which is meaningless to anyone except the programmers of the MetaTagger UI.
Also, in 5.5.2 you can access other form variables to determine the path / name of the file being tagged. This too is unavailable in 6.1.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
look, you call it documented? we are talking about a different entity - system-wide metadata capture template. yes, it is similar to templating, but all the differences HAVE to be documented somehwere, right? but they are not.
Actually, yesterday I discovered another thing - that similarly to coloring labels in DCTs, one could do the same in MDCT.... And this will be handy, as another annoyance with MDCT is that when one chooses to tag multiple files, all 'Tabs' that you have created, dissapear, so if you color labels in every tab, in a different color, you could still distinguish them....
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Adam Stoller
I said SEMI-documented. I'm not happy with the lack of distinct documentation covering customizations of the MDC form either. It's based on that, that Support is claiming my need for the same functionality in 6.x that exists in 5.x is a "feature request" rather than a "bug".
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
well, to start with, MDCT has not been well documented in previous versions either... So, one of FRs would be to simply properly document it.
(again, probably we are asking for too much - and it's better to charge our clients for the knowledge that we have in our heads and that is not written anywhere?
)
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Migrateduser
Hey Guys,
Fish: In Teamsite 6.1 with MT 3.6.0, I've gotten a callout to populate values in the field from which it was called. I've also (a workaround) can traverse through the fields and get the selected or entered values into the callout. The name of the callout field propxxxx is available to the cgi callout but can't really determine any pattern as that name itself changes everytime it is loaded.
The solution I needed this for was:
- A user can select a Country from a drop-down field (no callout) followed by a readonly textbox with a callout.
- The callout cgi has available to it the name of the field that it was instantiated from and from that I could get/set value from the callout.
- Once I had the field name, I got the number of the field (so if I had 10 fields and the readonly textbox of 9th, then I got that number '9'), I decremented that by 1 and using javascript, got the field before it, which was Country.
- The name was meaningless propxxxx, but I could get the value.
- Based on the value I queryed the database to get the states available for that country.
- The user selects the state and that value is populated in the readonly textbox.
This solution (workaround) will work as long as the country and state fields aren't seperated (we don't put another field in between them). This may not be efficient but it serves our purpose for now, and it works around a severe limitation that MT has.
Thanks for you help!
-Mukesh
Adam Stoller
Sheesh - thanks for the update - I had a feeling that you might be able to do some kind of work-around hack like that - but the key word there is "hack" - because we shouldn't have to go through that process of deciphering the 'propxxx' identity and calculating how many fields away from the one the CGI was called on to the one we wish to modify is.
If I get really desperate, I might try using that mechanism, but I'd rather have the code for populating form variables in the cgi-callouts from the MDC fixed to provide the kind of information that existed in the *old* OOTB MDC form.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
vanesh
Hi Mukesh,
Environment : Teamsite 6.1 / Solaris / Metatagger 3.6
i have similar kind of requirement in my Metadata DCT where on a cgi-callout it should popluate a list from the database based on previous field value. Can you please share the code ?
Regards,
Vanesh
Adam Stoller
There was a
patch added to TeamSite 6.5 (not sure if it was included in SP1) to provide the ability for callouts on the metadata capture form to access other field values, by name - through a level of indirection ($cgi->{form}{fieldname} => "propxxxx", $cgi->{form}{propxxxx} => value).
You probably need to check with Support on this - I believe this is FR #46736
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Ottawa_IWOV
Any chance of providing an example of how you did this?