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)
Replicates not in DCR
Winston
When I open an old file that doesn't have replicant entries in the DCR the DataCapture values don't display. If I save, close and then reedit the values are displayed. I'm using Teamsite 5.5.2 and FormApi. Below is the Datacapture.cfg for the two items:
<item name="subjectNtype">
<label>Subject </label>
<description> Topic(s) of the item and vocabulary of the selected terms.</description>
<replicant combination="and" default="0" hide-name="f" max="15" min="0">
<item name="subject">
<description> Terms that describe what the item is about. Restricted to 50 characters.</description>
<label>Subject</label>
<textarea rows="1" cols="50" wrap="virtual"/>
</item>
<item name="subjectType">
<label>Subject type</label>
<description> Keywords are free text terms. MeSH terms are from the NLM Medicial Subject Headings list.</description>
<radio>
<option selected="t" value="Keyword" label="Keyword"/>
<option value="MeSH" label="MeSH"/>
</radio>
</item>
</replicant>
</item>
<item name="languages">
<label>Language </label>
<description> Language of the text of the item.</description>
<replicant combination="and" default="1" hide-name="f" max="2" min="1">
<item name="language">
<description> Select English, Spanish or Not applicable.</description>
<label>Language</label>
<select required="t">
<option selected="t" value="eng" label="English"/>
<option value="spa" label="Spanish"/>
<option value="NotApp" label="Not Applicable"/>
</select>
</item>
</replicant>
The Language is a required field and I'm able to force the User to expand and set the Language using FormAPI, but I'd like another option.
Find more posts tagged with
Comments
13adam13
Not sure about the issue of the datacapture being ignored, if there aren't entries in the data file. I have opened DCRs before that were missing fields from the datacapture.cfg, and the fields still showed up, just were empty.
As far as forcing the user to select a language, you should be able to change your replicant like this:
<select required="t">
<option selected="t" value="" label=""/>
<option value="eng" label="English"/>
<option value="spa" label="Spanish"/>
<option value="NotApp" label="Not Applicable"/>
</select>
Then, the user needs to change the language selection to pass the required test.
--Adam Wilson
Senior Programmer
Winston
Adam,
Thanks for the response. I tried you example above. Still the same problem. For item(s) in a replicate not in the DCR, no XML entry, you have to select the "+" to expand. Once saved and re-edited you do not. Other items not in the DCR work fine.
Thanks again
13adam13
I totally missed it the first time through. You need to change the minimum on the replicants to be 1, instead of 0.
When it is 0, then it starts with none showing, unless there is one in the DCR already. When you say min=1, then it starts with showing 1, unless there are more in the DCR already.
Since the min=0, making the languages field required only makes it required when it is present. You will find that even after saving, as you described, and opening again, that you can delete the replicant that shows up and save again without issue.
--Adam Wilson
Senior Programmer
Winston
Subject had min=0, thanks for catching that. But Language has min=1(see first post) and still doesn't expand unless saved first.
Thanks
13adam13
right, but the minimum on the language is only enforced if the replicant exists in the DCR.
If the replicant container doesn't exist, there are no rules on the elements within it to enforce.
--Adam Wilson
Senior Programmer
Migrateduser
Hi Winston,
I have a similar problem. Did you get a work around for this problem?
thanks