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)
List of form options from DB in datacapture.cfg
System
Teamsite 5.5.2 SP3 -- In my datacapture.cfg I have a select that has options that I would like to populate from oracle database values. I have been maintaining the list by hardcoding the values in the datacapture.cfg, but it would be easier, and the system would have better data integrity if I could get that list of values from the database without manual intervention. I have the sql that would generate the option values, but what's the syntax for making that call? How can I embed this database call within the datacapture.cfg?
Find more posts tagged with
Comments
JonathonG
Check out the <inline> command in your templating documentation.
One note: You *may* want to find a way to cache the options list so that every DCT load doesn't incur db overhead. One way to do that would be to create a text file of the options and have a regularly scheduled task run a db query and update that text file.
Jonathon
Independent Interwoven Contractor
Migrateduser
Thanks for the information. In digging a little deeper I'm wondering if I can't use the <inline> tag within a datacapture.cfg MDC form. I keep seeing forum entries that claim that Metadata capture can't use the <inline> tag.
Just to test the inline I used the sample from the Templating documentation (page 61 of tst.552.dev.pdf)
Within my datacapture.cfg I have the following code...
<item name="SubCategory">
<label>Sub Category</label>
<select size="10" multiple="t" required="t">
<inline command="c:\iw-home\TeamSite\iw-perl\bin\iwperl.exe c:\iw-home\TeamSite\examples\Templating\config\example_server_side_inline_callout.ipl" />
</select>
</item>
When I excute the command from the server,
c:\iw-home\TeamSite\iw-perl\bin\iwperl.exe c:\iw-home\TeamSite\examples\Templating\config\example_server_side_inline_callout.ipl
I get the expected output. But when I attempt to set Metadata on a file I get the "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request." -- we've all seen that error at least once in our Teamsite development days.
Any ideas? Does Interwoven support <inline> within the Metadata Capture -- I should have specified that I'm attempting this in the Metadata Capture form?
Edited by eeakin on 02/23/04 03:12 PM (server time).
abhishek_gupta
Not too sure if inline can be used in metadata datacapture.cfg. I know it does not support formapi.
Instead of using inline you can do a callout. Something like..
<callout type="cgi" label="example" url="/iw-bin/iw_cgi_wrapper.cgi/example_server_side_inline_callout.ipl"/>
Migrateduser
Indeed you are correct. Just heard the definitive from a case I opened. According to Interwoven I have to either use Metatagger or upgrade to TS 6.0 -- both of those options transform the MDC into a jsp where I can use <inline>
deeps
try using the following.
<inline command = "cat /path/xyz.cfg"/>
xyz.cfg is a text file which can be created on scheduled basis and shld contain data in following format
<?xml version="1.0" encoding="UTF-8"?>
<substitution>
<option value='123' label='123'/>
</substitution>