137
Views
2
Comments
Solved
Outsystems list in JS
Question

Hi everyone.

 I have a Webblock, that webblock receives a list of strings as an input, I want to iterate through that list in an expression where I have some Javascript, problem is I dont know how to approach this.

 On one hand I thought that copying the list in JS using slice but that doesnt work since In the expression I cant use the list!

 I also though about using a Webblock variable (integer) to keep the indexes  but I cant update that variable from JS, so I am not sure how to proceed! Any tips?

2020-02-28 09-46-54
Eduardo Jauch
Solution

Hi Guilherme,

You can serialize the list and pass as a string to JavaScript.

You can use, for example, JSonSerialize

Cheers

2018-05-30 11-58-33
Guilherme Menescal Dantas

Hi Eduardo,


 Good one, that will do the trick, thanks Eduardo!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.