HasQueryParam with no Result

Dear all,

i am calling my webpage with the following URL : +
https://hbm-online.eu/spielleiter/?sim=sim1

i need the value of param "sim" , an i try to get it with :

if HasQueryParam ('sim', LSimulationQueryStr) then
begin
if TryStrToInt(Copy(LSimulationQueryStr,4,Length(LSimulationQueryStr)), LAktuelleSimulation) then
begin
wxBaseWriteLog.Write(' Query passed, Simulation is set to ' + LAktuelleSimulation.ToString, slDebug);
end;
end else
begin
wxBaseWriteLog.Write('No Query passed, Simulation is set to DEFAULT ', slDebug);
LAktuelleSimulation := 1;
end;
but i Always get no query result......
i tried cas sensitive, no result

where is my error ?????

br
Michael

PS:
is Application.Parameters deprecated ?
i found it in Holger Flick's book :slight_smile:

I retested this here but I cannot see an issue with HasQueryParam

Test code

uses
WEBlib.WebTools;

procedure TForm3.WebButton1Click(Sender: TObject);
var
  LSimulationQueryStr: string;
begin
  if HasQueryParam ('sim', LSimulationQueryStr) then
  begin
    console.log(LSimulationQueryStr);
  end;
end;

executed, this results in:

Hi Bruno,

thx for the fast answer, it seems to be a problem of uppercase and lowercase or a mix of both. Is there a way to ignore case sensitivity???

At this moment, it is indeed case sensitive only.

:worried: may this could be a subject for the next update

Thx for the fast answers
br
Michael

Next version will have this capability