I have a TWebClientDataSet which retrieves data, the data is displayed in a grid, so I know, that it is there.
Webmemo1.Lines.Add(WebClientConnection2.URI);
WebClientConnection2.Active:=true;
WebMemo1.Lines.add(WebClientDataSet2.FieldByName('NAEHRWERTCD').AsString+' '+WebClientDataSet2.FieldByName('WERT')
However the last line results in:
ERROR
TypeError: this.FFieldMapper is null | this.GetFieldData$1@https://www.nutritional-software.at/WebCore/P03/Project1.js:99045:7 this.GetFieldData@https://www.nutritional-software.at/WebCore/P03/Project1.js:90189:21 this.GetData@https://www.nutritional-software.at/WebCore/P03/Project1.js:86636:32 this.GetAsString@https://www.nutritional-software.at/WebCore/P03/Project1.js:86758:16 this.WebDBGrid1ClickCell@https://www.nutritional-software.at/WebCore/P03/Project1.js:135635:82 cb@https://www.nutritional-software.at/WebCore/P03/Project1.js:242:19 this.HandleClick@https://www.nutritional-software.at/WebCore/P03/Project1.js:123394:14 cb@https://www.nutritional-software.at/WebCore/P03/Project1.js:254:28
at https://www.nutritional-software.at/WebCore/P03/Project1.js [99045:7]
The fields are persistent.
There is another CDS on the form, where the same approach works as expected.
What am I missing?
The whole event looks like this:
procedure TForm1.WebDBGrid1ClickCell(Sender: TObject; ACol, ARow: Integer);
var
s1, s2: string;
sSearch: string;
begin
WebMemo1.Lines.Clear;
s1 := WebClientDataSet1.FieldByName('Lebensmittelcd').AsString;
s2 := WebClientDataSet1.FieldByName('herkunftcd').AsString;
WebMemo1.Lines.Add(s1 + '-' + s2);
sSearch := '?filter=LEBENSMITTELCD,eq,' + s1 + '&HERKUNFTCD,eq,' + s2;;
WebClientConnection2.URI := 'https://www.nutritional-software.at/api/api.php/records/TBLNAEHRWERT' + sSearch;
Webmemo1.Lines.Add(WebClientConnection2.URI);
WebClientConnection2.Active:=true;
WebMemo1.Lines.add(WebClientDataSet2.FieldByName('NAEHRWERTCD').AsString+' '+WebClientDataSet2.FieldByName('WERT').AsString); < ----------------- fails
end;