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?
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.
I read the article. However, i am unable to find a JS that would work for multi select check box prompt.
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.
Here's a sample:
http://www.cognoswithjay.com/selecting-multiple-prompt-values-dynamically-using-javascript/
Tested in Firefox.