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)
Opening a saved DCR in a DCT
cheeku
I want to attain the following functionality:
On the click of 'New Data Record' a DCT opens. It carries a button on it and an item carrying the address of a saved DCR. On the click of this button the items of this saved DCR should appear on the DCT. Essentially this DCT and the saved DCR will have same items , only that the DCT will have two extra items i.e. button and the adress item.The address of the DCR can change, i.e. the user can open up a saved DCR from any of the branches.
This process is similar to what teamsite does i.e when I click on a saved DCR, it consults the datacapture.cfg of that branch and appropriately opens up a DCT. I want to attain the same functionality, the difference being that I want to open up a saved DCR from some other branch.How can I attain this functionlity?
Find more posts tagged with
Comments
Adam Stoller
.How can I attain this functionlity?
By writing some code. The 'button' is a cgi-callout, presumably associated with a text field. The cgi-callout item will call a CGI script, that will (a) allow the user to browse for a saved DCR, (b) after having selected a DCR, will then copy all the relevent fields from the selected DCR into the current form.
You have to write the CGI / javascript code (within the CGI) to do all of the above. I believe there has already been code posted in the tech library for doing the browsing functionality. You can use modules like TeamSite::XMLnode to parse the selected DCR, or perhaps XSLT, or any of another number of modules or coding techniques, and if you look in the manuals, you'll find examples of javascript code that you can build on in order to transfer all the values extracted from one DCR into the DCT form for the new DCR.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com