dynamic value set from single response to multiple response

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

dynamic value set from single response to multiple response

Post by prabhustat »

Hi,

I want to adopt dynamic value set from single response to multiple response, i.e if suppose a single response variable

value = X1
value = X2
Value = X3

Selected X1

then only display other than selected values in multiple response

X2
X3.



Thanks in advance,

Prabhu
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: dynamic value set from single response to multiple response

Post by aaronw »

Take a look at the blog post Dynamic Value Sets With the ValueSet Object. The approach taken in Iterate Through Value Set Codes and Labels makes sense for the example you described.
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Re: dynamic value set from single response to multiple response

Post by prabhustat »

Thanks it works well for two variables, but if we have more than two variables, dynamic options, shows the first variable options.

With regards,

Prabhu
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: dynamic value set from single response to multiple response

Post by aaronw »

You need to declare the valueset globally. I have attached a demo project.

/edit Attachment removed. See my first post on the second page.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: dynamic value set from single response to multiple response

Post by htuser »

Hi Aaron,
Thanks a lot for this example. However it have a bug. When i return to change, correct or modify something after first choice, it doesn't display popup window for choice in field 2 or field 3.
Vs_error.jpg
Vs_error.jpg (72.22 KiB) Viewed 5172 times
G.VOLNY, a CSProuser from Haiti, since 2004
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: dynamic value set from single response to multiple response

Post by aaronw »

I'm not able to reproduce what you're seeing. However, when I create a demo I sometimes don't associate an input data file (for convenience). See if you have any issues with this new attachment.

/edit Attachment removed. See my first post on the second page.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: dynamic value set from single response to multiple response

Post by htuser »

Dear Aaron,
I always detect issue. It's very easy to detect it:
1.- Fill all fields: FIELD_1, FIELD_2, FIELD_3;
2.- Dont Accept this case and Change, modify FIELD_1 choice;

and, issue will occur. It will not show the popup choice for FIELD_2...and you'll be blocked with
WARNING: Out of range! Please enter a valid value for FIELD_2.

If you can't reproduce it, i'll send a video to you.
Please let me know.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: dynamic value set from single response to multiple response

Post by aaronw »

Thanks, I see the problem. I've attached a corrected implementation. Let me know if you have any questions.

/edit Attachment removed. See my first post on the second page.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: dynamic value set from single response to multiple response

Post by htuser »

Thank you Aaron.
It work finely.
But i would like to know if first examples issues related to a conception problem of valueset objects so that you use a programming
workaround to fix it or no?
Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004
Win Ko Ko
Posts: 3
Joined: April 23rd, 2019, 8:18 am

Re: dynamic value set from single response to multiple response

Post by Win Ko Ko »

I would like to know about valueset for multiple response.
Your demo version is fine for single response.
When all field are multiple responses.

field_1: a, b , c
when field_1 is answered with a and b
then field_2 display only c.

How can i control those multiple responses. Thank.
Post Reply