RobYost Posted November 14, 2017 Share Posted November 14, 2017 // ============================================================================= function rtnAllParms(): String; var i: Integer; p: String; begin for i := 0 to UniApplication.Parameters.count - 1 do begin p := p + '&' + UniApplication.Parameters[i]; end; Result := p; end; //This way you can pass a parameter without '=true' //example: www.xxx.com?Demo&LoadData // if(ParmExists('Demo') then DoSomething // ============================================================================= function ParmExists(aParm: string): Boolean; var i: Integer; begin Result := False; for i := 0 to UniApplication.Parameters.count - 1 do begin if (UpperCase(aParm) = UpperCase(Copy(UniApplication.Parameters[i], 1, Length(aParm)))) then begin Result := True; Break; end; end; end; // ============================================================================= function DeleteParm(aParm: string): Boolean; var i: Integer; begin Result := False; for i := 0 to UniApplication.Parameters.count - 1 do begin if (UpperCase(aParm) = UpperCase(Copy(UniApplication.Parameters[i], 1, Length(aParm)))) then begin UniApplication.Parameters.Delete(i); end; end; end; Quote Link to comment Share on other sites More sharing options...
multimesut Posted November 16, 2017 Share Posted November 16, 2017 Thank you. And function ParmValue(aParm: string): String; var i: Integer; begin Result := ''; for i := 0 to UniApplication.Parameters.count - 1 do begin if (UpperCase(aParm) = UpperCase(Copy(UniApplication.Parameters[i], 1, Length(aParm)))) then begin Result := UniApplication.Parameters.Values[aParm]; Break; end; end; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.