TWebDBComboBox question

Hello!

I have a web client that needs to fill a form and call a webservice (XData service).

The webservice interface is like this:

    [Authorize]
    [HttpGet] procedure SendOrder(Date: TDateTime; LocationId, MaterialId: integer; Notes: string);

I'm planning to do it with an XDataWebDataSet (with calculated fieds) and a TWebDBComboBox with the list source from another XDataWebDataSet. I am able to set the combobox list and to prepare the main dataset.

The problem is that I don't know how to send LocationId and MaterialId from the comboboxes or the dataset. If I try to call the service with the data like this:

adsEdit.FieldByName('Location.Id').AsInteger

then it's always empty.

My question is - how is the best way to send the data from a combobox (that has a list source) to a web service?

You can try this:

JS.ToInteger(TJSObject(adsEdit.FieldByName('Location').Value)['Id'])