angular-schema-form icon indicating copy to clipboard operation
angular-schema-form copied to clipboard

copyValueTo doesn't like arrayIndex

Open ghost opened this issue 10 years ago • 5 comments

I cannot copy a value from one question in a tab array tab to another question in the same tab. E.g. The following merits no results because arrayIndex is not evaluated as a variable. All other efforts to extract the value have been unsuccessful.

 {
    "key": "comments[].Checkbox1",
    "copyValueTo": ["comments[arrayIndex].Checkbox2"]
 },
"comments[].Checkbox2"

Any ideas? I feel I may be missing something obvious.

ghost avatar Sep 29 '15 15:09 ghost

Also running into this issue. How do I copyValueTo within a Tabarray?

michaelarichard avatar Feb 22 '16 19:02 michaelarichard

This should be working now in the alphas.

Anthropic avatar Apr 20 '17 10:04 Anthropic

Testing on pre-release. No luck so far. Am I missing something?

        {
          "key": "comments[].checkbox1",
          "copyValueTo": ["comments[arrayIndex].checkbox2"]
        },
        "comments[].checkbox2"
      ]

Replacing the arrayIndex with 0 or 1 accesses the proper field on each respective 0/1 tab, but I am still unable to make it dynamic by using arrayIndex

  "_from": "angular-schema-form@pre-release",
  "_id": "[email protected]",
  "_inCache": true,
  "_location": "/angular-schema-form",
  "_nodeVersion": "7.7.4",```

michaelarichard avatar Apr 26 '17 00:04 michaelarichard

@michaelarichard thanks for letting me know, I'll take a look.

copyValueTo paths are not interpolated or pre-processed it appears, I should be able to sort it soon :)

Anthropic avatar Apr 26 '17 06:04 Anthropic

Is this suppose to be resolved in 1.0.0-alpha.4? I have the same issue.

jolevesq avatar Nov 16 '17 14:11 jolevesq