Page 1 of 1

Dynamic Value Set From external dictionary does not retain values

Posted: November 15th, 2018, 12:34 am
by bmuganda
Hi all,

I have a field a field in my application that is referencing values from an external dictionary. On add, the values are picked. However on modify, the field does not retain the values from the dynamic value set, hence have to re-select the values again. The field being in a roster group, means I have to remember the option selected for each occurrence.

How do I make the the field to retain values from the dynamic value set.

Thanks!

Re: Dynamic Value Set From external dictionary does not retain values

Posted: November 15th, 2018, 8:09 am
by Gregory Martin
Whenever you start adding a new case, or modifying an existing case, the value sets are all reset to their initial values. In your case, whatever logic you execute during an add should be executed on a modify and you'll get the value sets that you expect.

There is no way, other than recreating the value set each time, to retain the values from one case to another.

On a roster, make sure that you put the code to generate the value set in the onfocus event, not the preproc event, so that it will be updated whether or not you move forward or backwards in your program.

Re: Dynamic Value Set From external dictionary does not retain values

Posted: November 16th, 2018, 2:34 am
by bmuganda
Hi Greg,

Tried both ways, seems not working. For some reason on single variables the value is retained but on roster items it gets vanished. Even during entry when you navigate back, the selected value gets vanished.

Re: Dynamic Value Set From external dictionary does not retain values

Posted: November 19th, 2018, 12:27 pm
by Gregory Martin
Post your application here, or email cspro@lists.census.gov, and we can take a look at it.

Re: Dynamic Value Set From external dictionary does not retain values

Posted: September 26th, 2019, 11:54 am
by arkagwa
Dear ALL

I have similar cases i don't understand why?? It worked perfect in cspro 7.2 and lower versions
Screenshot 2019-09-26 18.27.16.png
Screenshot 2019-09-26 18.27.16.png (62.82 KiB) Viewed 5024 times

Re: Dynamic Value Set From external dictionary does not retain values

Posted: September 26th, 2019, 1:34 pm
by josh
That error means that the capture type for the field does not match the dynamic value set you created. Try changing the capture type from the field properties.

Re: Dynamic Value Set From external dictionary does not retain values

Posted: September 26th, 2019, 1:58 pm
by josh
In this case it looks like the problem is that the one of the strings in the dynamic value set is longer than the length of the alpha field that the dynamic value set is for. Increasing the length of the field fixes the issue.