699
Views
2
Comments
[How to Use JavaScript in OutSystems] Getting return values/structures from a Javascript function
How about adding some samples on how to set up output parameters to return values and structures from a Javascript function in an Action?
2012-03-02 13-17-21
Paulo Ramos
Staff
Hi Taka,

I'm not sure if I understood your scenario, but it seems that you need to:
1. Do some calculations in JavaScript (client-side).
2. Use the result of those calculations inside an action (server-side).

One of the screens in the sample includes this scenario - see here. In this example, the text message is built client-side, submitted to the server via a hidden input (open in Service Studio to see it), and then a Feedback Message is used to simply show the message.

There are other (more sofisticated) ways of achieving this, of course. For example, you expose a REST service, then your JavaScript code can invoke it to send data.
2012-03-02 13-17-21
Paulo Ramos
Staff

Hi Carlos,

Just download / install the sample, the example is included there.

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