Dynamic Value Sets using pre-load file

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
sokiya
Posts: 15
Joined: January 15th, 2014, 5:48 am

Dynamic Value Sets using pre-load file

Post by sokiya »

Hi CSPro users,
I would want to implement a dynamic value set using a pre-load file. There are four levels that I would want to narrow down by filtering out the elements that aren't a subset of the previously selected value, in other words cascading select. Attached is an example of the pre-load file
I know there needs to be some tweak in the code below

Code: Select all

onfocus

if loadcase(location_DICT, SC_CODE) = 1 then

	numeric i;
	do i = 1 while i <= count(location_DICT.LOCATION_REC)
		labels(i) = VL_SL_NAME(i); 
		codes(i) = VL_SL_CODE(i);
	enddo;
	codes(i) = notappl; 
	setvalueset(SL_CODE, codes, labels);
endif;
Thanks for the help.
Attachments
Preload.xlsx
(9.6 KiB) Downloaded 299 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Dynamic Value Sets using pre-load file

Post by josh »

You can see some examples of cascading value sets here: http://teleyah.com/cspro/DCJune2015/05- ... -entry.pdf
sokiya
Posts: 15
Joined: January 15th, 2014, 5:48 am

Re: Dynamic Value Sets using pre-load file

Post by sokiya »

Thanks Josh for the link. However, the outlined approach on cascading select doesn't use pre-load file so it may not answer my question. The one on Lookup files is the one that I did replicate but the challenge is to narrow at each level. The example used is straightforward since there are only two levels district and village. In my case, the levels are four, the lists are huge (hence the choice of a pre-load)
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Dynamic Value Sets using pre-load file

Post by josh »

Here is an example that uses a lookup for multiple levels of geography.
Attachments
Census Data Entry (cascading value set).zip
(24.89 KiB) Downloaded 338 times
sokiya
Posts: 15
Joined: January 15th, 2014, 5:48 am

Re: Dynamic Value Sets using pre-load file

Post by sokiya »

Thanks Josh! This is exactly what I was referring to. Much appreciated.
Post Reply