If you are unable to create a new account, please email support@bspsoftware.com

 

Change of default selection of a prompt value based on another prompt value

Started by nishithshri, 13 Mar 2017 01:31:12 PM

Previous topic - Next topic

nishithshri

I am trying to set up a default selections based on another prompt value. For example: If a user select X value in prompt 1  then the prompt 1 should default it to 'abc'. Prompt 1 and prompt 2 are cascading prompt. I have been trying a few things but not luck so far !!

Any help or suggestions?

AnalyticsWithJay

I have an article on selecting a default value dynamically:

http://www.cognoswithjay.com/selecting-a-dynamic-default-value-for-value-prompts-using-javascript/

Basically, we hide the value that needs to be selected on the page. Javascript will pickup that value, traverse the prompt you want to have selected, and select the matching value.

Have a read and let me know if you have any questions.

nishithshri

I read the article. However, i am unable to find a JS that would work for multi select check box prompt.

AnalyticsWithJay

Quote from: nishithshri on 15 Mar 2017 04:23:44 PM
I read the article. However, i am unable to find a JS that would work for multi select check box prompt.

If it's a single dynamic value the code should work the same, even for a checkbox. If it's a multiple dynamic value, you've piqued my interest... I may have to write a blog post about this.