Very similar problem to this thread: 

https://www.outsystems.com/forums/discussion/27053/data-binding-issue-for-list-of-webblock-containing-form/

Except the accepted solution is not working. 

Platform 10;

This web block of ours takes in a Booking record, passed on by a list of these. 

I tried doing an assign as a local variable in the preparation as suggested, but it's all blank when it comes the time to hit the Accept button.


I need this data to call in the BookingUpdate API node right there!


Any ideas?

Hi Mariano,

Not sure I understood.

If you are receiving data from outside the web block or fetching it in the preparation of the web block (API method, aggregate, etc), you don't need a local variable. Just use an assignment to copy this data to the 'Form.Record' in the preparation. 

And on updating, just use the Form.Record.

Why exactly are you using a local variable?
And, what's the source record for BookingUpdate?

Cheers.

Hello Eduardo, thanks for your quick response.

Here's the structure:

On the main Bookings screen, a SQL runs in preparation, because of the requirements of the project. The results of this SQL are stored in a list of a custom structure we built

With that list, we use a simple List Records widget.

Each line of this ListRecords is one BookingInfo webblock, which is not a form, takes in a record of this SQL list (that Booking input parameter you see above) and it's just a custom made block with divs and expressions, and the two buttons, Accept and Reject booking.

BookingUpdate is a server action which calls the API; it has a few input parameters, 2 of which are mandatory and should be populated with data the Webblock has received as that input param. 

Hi Mariano,

I tried to mimic what you want to do (not exactly what you've done), and for me, it works.
Could you please take a look at my example and check what is different?

Cheers.

P.S. Note that I don't have a platform 10 (only 11, Personal), so I can't say if what I did would fail in 10. 

Hi Mariano, 

Did you tray to use the needed parameters in the screen? 

The widgets that display the values being updated in the "On notified" action triggered by the webblock. 

Just an idea!!

Graça

@Eduardo, yes, that example is very close to what I'm trying to do, and I can see that by the time you click save, the info on the web block is still there and passed on correctly.

Any idea why mine is just disappearing?


@Maria , yes, the parameters coming in are used in a couple places such as expressions and even a small aggregate running in the Webblock's preparation, all of that displays correctly so I know the data is passed through. But at the moment I click the Accept button the input variable is empty.