Quote from
egodyla on July 22, 2024, 4:07 am
Hello.
I am trying to populate a dropdown withe the result of a select statement. I can display the JSON result without problems; However, when I try to displau the values only, I fail miserably....
Please help, here is the code I am using:
CreateEmptyObject [misku]
CreateEmptyArray [arreglo]
SetVar [misku] [respsku]
BeginJS
const jsonArray = JSON.parse($App.misku);
// Extracting values and storing them in a new array
jsonArray.forEach(item => {
valuesArray.push(item.NombreSKU);
});
$App.arreglo = [...valuesArray];
EndJS
The Jason is multiline with this format:
{"NombreSKU":"Acido 2-Etil Hexanoico "}
respsku is the parameter for the subroutine, the Json from the select is passed using it
Hello.
I am trying to populate a dropdown withe the result of a select statement. I can display the JSON result without problems; However, when I try to displau the values only, I fail miserably....
Please help, here is the code I am using:
CreateEmptyObject [misku]
CreateEmptyArray [arreglo]
SetVar [misku] [respsku]
BeginJS
const jsonArray = JSON.parse($App.misku);
// Extracting values and storing them in a new array
jsonArray.forEach(item => {
valuesArray.push(item.NombreSKU);
});
$App.arreglo = [...valuesArray];
EndJS
The Jason is multiline with this format:
{"NombreSKU":"Acido 2-Etil Hexanoico "}
respsku is the parameter for the subroutine, the Json from the select is passed using it