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)
Issue while editing DCR
janhavi
We have datacapture form and it contains 4 tabs. When user fills form first time, it saves details fine and generates DCR file. When user "Edits" DCR file, one of the field value gets updated automatically. I have attached datacapture file. Under "Right Rail" tab -> Once we add "Content Component" and select "Component Type" as "Titlelist" , it populates Content Type field with 3 values - Article, Video and Calculator. Once user selects Video or Calculator and saves, actual value gets saved in DCR but once user "Edit" DCR file, Content Type value displays "Article" instead of Video or Calculator.
Not sure what is causing this issue, can you help to fix this?
Thanks!
Find more posts tagged with
Comments
Adam Stoller
I don't really have the time or inclination to completely debug your code for you - I suggest you add some alerts or other form of debugging to your FormAPI code - anywhere you use a "set
****
()" call - print out the item's name and the value you are about to set it to (or the list of label/value pairs for options).
That should give you much more insight into what's happening and allow you to at least narrow down, if not resolve, the issue.
janhavi
I am able to find root cause of the issue, thanks for help.
I have one question - for Multiple Select field, when we do getvalue it returns value in form of zero based indices of the selected options, do we have way to get actual text value ? example - if i have Multiple select with aaa,bbb,ccc and if i select bbb option, get value returns 1 value, would like to know if we have way to get bbb as output.
In this template, multiselect options are displayed depending upon drop-down value that user selects . Once user selects one of the value from multiselect and clicks save, that value gets saved in DCR. but when edit is clicked, only that value is dispalyed to user in multiselect field and getvalue returns as 0.
"OnItemChange" logic helps to fill all options in multiselect but that runs only if drop-down value is updated.
Thanks
Janhavi
Thanks
Janhavi
Rick Poulin
iwItem.getOptions()[iwItem.getValue()].text (or .value)
Note: this is obviously shorthand. Yours should have more exception handling for cases where getValue() returns null or a value outside the range of the options array.
My_chart.jpg