Assigning values to a dropdown list without using export value field
Copy link to clipboard
Copied
I have run into a road block with trying to keep export values assigned to the options in my list. I have two lists, one is dependant on the other. The issue I have is when I change the option on the non-dependant list, the values from the dependant list disappear. This leaves my code unable to work, being that it depends on the values assigned. Is there any way that I can code the values into the calculation field of dropdown 2? I've also attached the file itself, to see if that helps.
Copy link to clipboard
Copied
When you set items you can also set export values like this:
this.getField("Dropdown2").setItems([["Month-to-Month",1],["Qarterly",2],["Annually",3]]);
I would also suggest you to check 'Commit selected value immediately' in dropdown field → options tab.
Copy link to clipboard
Copied
There are errors in your code. Check the JS Console for details.
However, what you're describing is to be expected. If you change the value of the dependent field, any values associated with it will be changed as well. Not sure why that is a bad thing...
Copy link to clipboard
Copied
Hello, I don't think you quite understand my question. The whole point of this post is to try to retain the values within the dropdown menu, because my code is dependant on it. To go even further, I need those values to remain so the code I have placed in the pricing area knows what price to populate. The codeing isn't the issue. Also, I'll have you know that my code works perfectly fine besides the fact mentioned above. It has been answered, so your input is not needed. And a note for the future, whenthe question has been answered your opinionated input is not needed. Thanks and good day!
Copy link to clipboard
Copied
Sorry for trying to help you out with your buggy code, and good luck!

