How to access int list in javascript mobile

var test = $actions.myaction();

I got this action that returns a list of integers, however i cannot access the values since the object it returns has square brackets. [[PromiseValue]]

Already tried to convert to json instead of having a list output, but the result is the same.

Thank you :)

Probably going to need more information to help you.

Can you provide the following:

  • What version of the OutSystems Platform are you using (i.e. OS 10, OS 11)?
  • What version of Service Studio are you using? (find this using Help > About)
  • Can you share an OML file with a simple repro of the code/issue you're trying to solve?

If there are promises involved, you may need to do more than just assign the output to a JS variable. But without additional context, it's not going to be possible to give you a better answer.

José Dantas wrote:

var test = $actions.myaction();

I got this action that returns a list of integers, however i cannot access the values since the object it returns has square brackets. [[PromiseValue]]

Already tried to convert to json instead of having a list output, but the result is the same.

Thank you :)

Hi Jose,

Here an example.

  1. I generate an integer array list starts 95 to 99
  2. I access it and show with console.log
  3. Result
    Hope it helps.

    With best regards,
    F.Karatay