Dynamic Value Set From external dictionary does not retain values

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
bmuganda
Posts: 37
Joined: January 18th, 2018, 11:57 am

Dynamic Value Set From external dictionary does not retain values

Post 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!
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

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

Post 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.
bmuganda
Posts: 37
Joined: January 18th, 2018, 11:57 am

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

Post 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.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

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

Post by Gregory Martin »

Post your application here, or email cspro@lists.census.gov, and we can take a look at it.
arkagwa
Posts: 119
Joined: November 18th, 2014, 5:25 am

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

Post 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 5029 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

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

Post 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.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

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

Post 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.
Post Reply