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)
How out a fixed value for a TS branch into a DB
System
We have configured ts so that we have a branch for each language. How do ensure that the 'Language ID' value for DCRs in a Branch is always set to a fixed value, 1 for english for example ?
Find more posts tagged with
Comments
Migrateduser
Configure/setup a callout in your DCT.
Migrateduser
You could also do this in 5.5.2 with FormAPI, which could set the value of a hidden field to a set value each time a new DCR is created.
If you don't have 5.5.2, you can use an <inline> to set the default value of an item, but the catch-22 is that <readonly> and <hidden> items don't have default values, so your language ID would have to be an editable field and you probably don't want that--the callout is a better idea if you don't have 5.5.2.
OR: perhaps your PT should handle this. IE, in an iw_perl block you could check the branch path and then assign the appropriate language id based on that. Are you sure that the language ID is "data" and not "format"? Would you never have an identical DCR that you want to generate into 2 or more different languages?
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
Migrateduser
A callout to the DB ?
But the DB should not know what language is being submitted
The language should be determined by which ts branch a DCR is being deployed from.
i.e I fill in a DCT from the 'English' branch and when the DCR is deployed there automatically is inserted a '1' in the Table for the language _ID
Migrateduser
Ok you're right, OpenAPI should work fine. But I thought there would be a more straightforward way, given that as Interwoven recommend that you use branches for language versions this requiremnt should extremely common if not totally universal. But maybe not everyone is using branches for language versions :-)
Adam Stoller
Not OpenAPI - FormAPI (different things)
There are various ways to use TeamSite and it's branching structure to support language variants. As in most things, there are pros and cons to any approach - what matters most is that the structure doesn't get in the way of doing what you need to do and that *you* understand what you are doing and why.
It sounds like you have a good idea of how you want to do things - great. The missing piece at this point would seem to be using FormAPI to help automate that process.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Actually meant FormAPI but typed Open (brain to hand interface not 100% today).
But thanks everyone.
Feel happy now that FormAPI is the solution and that I'm not doing anything crazy or missing something obvious.
cheers
/Nick
Migrateduser
If you are deploying the DCRs using DataDeploy to a database, you can do the dynamic computation of the language field value in the external tuple preprocessor. The TPP is a java-callout, called by DD, which supplies you with the area value. You can examine the value of the area, depending on the branch name, set a value in the Hashtable object and return it to DataDeploy.