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)
fetching metadata in datacapture.cfg
kalyani
I need to have a check in my DCT that if a custom metadata (date field) is set on the generated file , the DCR should be non editable . How to implement this check ? How is it possible to use data related to generated file in the datacapture.cfg ?
Find more posts tagged with
Comments
Adam Stoller
What version of TS (including SPs) on what platform?
Is this a set-in-stone design that you need to retrofit - or is this a design-in-progress? (if the former, it will probably be more difficult if at all possible. If the latter, it would beg for redesign - such as ....)
Does the date field in question *have* to be metadata? or could it be captured within the DCT itself? (this would be, by far, the simplest solution)
Do you use a field in the DCT to name the DCR?
Do you automatically name the generated file based on the DCR or do you track the relationship between DCR and generated page through some other means (DB, EA, etc.)?
Is the path of the generated file automatically determinable from the path to the DCR?
(assuming positive responses to the above, you could probably use FormAPI CallServer() to invoke a server-side script that could then either perform the read-only settings for you or call back to the DCT with a boolean value and from there do all the read-only settings (if necessary))
If you cannot assume positive responses to the above - I don't think there's much hope.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
kalyani
Thanks for the help . But I am really stumped on this one .
I am using TS 6.5 on Win2K .
Requirement States :
On subsequent editing of the DCR, there needs to be a FormAPI event that checks whether the publish_date metadata field has been set on the corresponding XML generated from that DCR. If the publish_date has been set, the DCR needs to be set to read-only.
For now , assuming to check for publish_date metadata set on the DCR which is user input when he saves the DCR .
Approaches tried :
Inline callout to .ipl where trying to execute <b> iwextattr </b>cmd which might return a status true or false to a hidden text field in DCT depending on which readonly behaviour of DCR can be set . .
Problem : Getting the DCR name in the perl file ( cannot use IWDCRInfo.getDCRName() ), since inline is called before javascript fns are executed ..
gzevin
IMO, your DCR needs to be changed to read-only at XML generation stage.. so DCR is set read-only from within a TPL. Talk to someone who set the requirement - I think they'd agree.
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
sorting_example.zip
Adam Stoller
How does the "publish_date metadata field [get] set on the corresponding XML generated from that DCR" ?
Is it set when the XML is generated initially?
Is it set within a workflow context?
Is it set completely arbitrarily at some unknown point after the XML is generated?
Is it set programmatically and/or via some script?
Is it set using the Set Metadata GUI?
The more details you know, the better chance you have of figuring out how to work within the context of the situation.
Greg's idea of handling at generation time makes sense IFF that is when the metadata is set on the generated XML.
Otherwise you need to try to take care of the situation at the time (or shortly after) when the metadata is actually set - and you need to decide whether you want to do it with metadata on the DCR or some field within the DCR or via some data stored within a DB or flat-file somewhere, etc.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
FieldMappingData.zip
gzevin
if metadata is not set on the generated XML, it should be set, just for this reason.. why bother with other solutions?
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU