cancel
Showing results for 
Search instead for 
Did you mean: 

Need to pass the URL parameters dynamically not hard-coded

former_member215598
Participant
0 Kudos

I am passing the values through a query template:

SET NOCOUNT ON

DECLARE @StartDate DateTime

DECLARE @EndDate DateTime

SET @StartDate = DATEADD(minute,60,'[Param.2]')

SET @EndDate = DATEADD(minute,60,'[Param.3]')

SET NOCOUNT OFF

SELECT TagName, DateTime, Value

FROM History

WHERE TagName IN ('[Param.1]')

AND wwRetrievalMode = 'Cyclic'

AND wwCycleCount = 500

AND wwVersion = 'Latest'

AND DateTime >= @StartDate

AND DateTime <= @EndDate

And declaring in the Transaction Details:

tagString      FEN_01_AMIX_ASIDE.FLOw

StartDate     2014-04-21 10:00:00

EndDate      2014-04-22 12:00:00

But every time I change the dates in the url it does not show the new dates it keep on showing the above dates.

For instance if I do the following:

http://<server>:50000/XMII/Illuminator?IsTesting=T&QueryTemplate=HistQuery/WebServices/WebServicesFE...

It still shows the content for

StartDate     2014-04-21 10:00:00

EndDate      2014-04-22 12:00:00

instead of

StartDate     2014-04-20 10:00:00

EndDate      2014-04-20 12:00:00

Accepted Solutions (0)

Answers (2)

Answers (2)

swaroop_anasane
Active Contributor
0 Kudos

Hi Amr,

I doubt if single quotes has to be used.

Thanks,

Swaroop

Private_Member_14935
Active Participant
0 Kudos

Hi Amr,

I tried the above url, you are right it doesn't consider the start and end dates that is being passed. However when I tried using StartDate instead of SD and EndDate in place of ED, it works fine.

You can try the url given below:

http://<host>:<port>/XMII/Illuminator?QueryTemplate=HistQuery/WebServices/WebServicesFENHist&StartDa...


Also which version of MII are you using? I tried the above url on MII 14.0 SP05


Regards,

Ria

former_member215598
Participant
0 Kudos

Thank you, for your response.  Yes, we are also using MII 14.0 SP05.  I will test the url when I get to work tomorrow.