FOUR-5348: 4.2.- Variable is not created if has default value dependent#1186
Merged
ryancooley merged 3 commits intodevelopfrom Feb 25, 2022
Merged
FOUR-5348: 4.2.- Variable is not created if has default value dependent#1186ryancooley merged 3 commits intodevelopfrom
ryancooley merged 3 commits intodevelopfrom
Conversation
ac7b2d0 to
df96515
Compare
df96515 to
4e4f532
Compare
bc52fd1 to
12cbc53
Compare
12cbc53 to
7fd2c0f
Compare
eiresendez
approved these changes
Feb 17, 2022
ryancooley
approved these changes
Feb 25, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue & Reproduction Steps
The problem was produced because for the default value was used a JavaScript expression that didn't return any value. By default JavaScript returns "undefined".
Expected behavior:
Even if the the expression used for the default value of a select list is undefined, its value should be able to be set.
Actual behavior:
The select list variable with the undefined default value it is not updated when an item is selected.
Solution
If the JavaScript function returns undefined, by default the variable is initialized with a null value.
How to Test
Steps to Reproduce:
[{"content":"1","value":"1"},{"content":"2","value":"2"}]
Put default value = 2
Add select list 2 with data connector
Put default value JS
if (this.form_select_list_2 != 2) {
}
Press preview button
Select an option in the second select list and verify that this 2nd dropdown variable update its corresponding variable.
Related Tickets & Packages
Code Review Checklist