Dynamic Value Set From external dictionary does not retain values

Discussions about CSEntry
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 » November 15th, 2018, 12:34 am

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: 1241
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 » November 15th, 2018, 8:09 am

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 » November 16th, 2018, 2:34 am

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: 1241
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 » November 19th, 2018, 12:27 pm

Post your application here, or email cspro@lists.census.gov, and we can take a look at it.

arkagwa
Posts: 109
Joined: November 18th, 2014, 5:25 am

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

Post by arkagwa » September 26th, 2019, 11:54 am

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 720 times

josh
Posts: 1986
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

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

Post by josh » September 26th, 2019, 1:34 pm

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: 1986
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

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

Post by josh » September 26th, 2019, 1:58 pm

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