I am trying to create edit a form in ReTool using a series of text inputs and then save that to an output file with the click of a button. The query runs successfuly but I get an error when I hit the button: “button3 has an error in a property.” I’m not getting my JSON file to download. Can anybody help me out?
let oldJson = filepicker1.parsedValue
let newRule = Edit_Rule.data.weight1
oldJson.rules[Select_Rule.value].yields[0].weight = newRule
let newRule1;
let newRule2;
if (oldJson.rules[Select_Rule.value].yields[1].weight != "undefined"){
newRule1 = Edit_Rule.data.weight2
oldJson.rules[Select_Rule.value].yields[1].weight = newRule1
}
else if (oldJson.rules[Select_Rule.value].yields[1].weight != "undefined"){
newRule2 = Edit_Rule.data.weight3
oldJson.rules[Select_Rule.value].yields[1].weight = newRule2
}
else {
return utils.downloadFile(oldJson, 'output_ruleset', 'json')
}