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)
Problem in Updating content
cheeku
Hi All,
i am reading some data from a file and this data is populated into a text box in a DCT whose default value i am setting to this read content . Now the content of file from where i am reading, is updated. But when i open the saved DCR in EDIT mode the value in DCR remains the old one and it does not get updated. Can anybody tell me how i can update this value also?
Find more posts tagged with
Comments
JonathonG
First, an explanation of why you're approach isn't working:
You are setting the value from this text file into the DCT's "default" field. That means, if the field has no value, use this as the "default" value. So, when you are editing a DCR, there is a value, and thus the "default" is ignored. Interestingly, on 5.5.2 at least, "default" seems to be always ignored on the edit case, even if there was never a value entered for that field. This seems to be a bug to me, but since I need to work around the case where there *is* a value, I haven't reported it.
Now, a suggested solution:
Instead of using the "default" property, you will need to use formAPI. Assuming you were formerly using an inline callout to populate the default property, you will need to use the callServer method to call the script which can generate the text, and then, using javascript, call the item's setValue method with that new value.
Jonathon
Independent Interwoven Contractor
iwovGraduate
Are you using an inline script to set the "default value" ? Are you using the <default> tag to set the "default value" ?
As far as I know, you cannot use <default> to "update" a value in DCR. <default> will not override an existing value.
You can use FormAPI to do what you are trying.
cheeku
i am using <default> tag. Is it possible to update using some inline scrpit which you were talking about. I havnt used it. Without CallServer, is there any other solution?
herald10
I am afraid not. You have to use FormAPI. use setValue to set the default value onload.
cheeku
I want to know Is there any chance of fixing this bug in coming version of Teamsite Tool?
JonathonG
For getting a bug fix, you'd probably have to go through support. Like I said, I needed to handle both cases (data in the field, data not in the field), so I just went with the formAPI workaround and this bug doesn't affect me.
Jonathon
Independent Interwoven Contractor