Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I Need to set the current date in the string, but it doesn´t work.
I have a field, named MeassureDate. There are values like '12.01.2014', '13.01.2014', '14.01.2014' and so on.
Temperature contains weathervalues: 5,2,3,4,7,8 and so on. (Values in °C). Hundreds of values a day.
In Script I set the variable vActDate to Today()
now I made a set Analysis-formula:
Max( {1<MeassureDate = {$(#vActDate)}> Temperature)
A TextBox Returns me 14.01.2014 for vActDate, bit the Set Analysis won´´t work. I get only a '-'.
Does anybody know, how to bind the variables functionaly in the Set Analysis-String?
Thanks a lot for your Help!
Marcel
Hi at all,
I think you all are right with your formula.
But now I found the error I made.
Nizam HM gave me an example which works as I needed. But copy the Formula into my QV-file, it doesn´t work.
So I take a deeper look on Nizams file.
In the Script I wrote
Set vActDate = Today()
This sets Today() into the variable. Not the Value. In a Textboxoutput you will get the Value. In a Formula it doesn´t work.
Nizam wrote:
Let vActDate = Today()
Let sets the value into the variable and so it works.
So I have to say thank you at all that gave me answers to this thread!
Thanks a lot.
Now I take the Formula:
Max( {1<MeassureDate = {"$(=Date (vActDate, 'DD.MM.YYYY'))"}>} Temperature)
Regards
Marcel
Hi Marcel,
first thing i observer from your expression is ')' closing parentheses is missing, if it is correct so then use Date() function while assigning the variable., like Date(Today()).
Marcel
Try this:
Max( {1<MeassureDate = {"$(=Date(vActDate, 'DD.MM.YYYY'))"}>} Temperature)
HTH
Jonathan
edit: fixed missing closing bracket
Hello Marcel,
From looking at the script you gave, the first ( after Max is actually red. This identifies an error with this bracket. So you should need another closing ) at the end it seems.
Sorry, but doesn´t work.
Max({1<MeassureDate = {"$(=Date(vActDate, 'DD.MM.YYYY'))"}>} Temperature)
Yes, I copied it from QV. And only here I lost the bracket.
It does not work with the bracket also. 😞
Hi,
I tried this, but no success:
In Script:
Set vActDate = Date(Today())
In Object:
Max( {1<MeassureDate = {$(#vActDate)}>} Temperature)
I put it in a Textfielt, with '=' at the beginning. I got a Entry in the TextBox:
Error in set modifier ad hoc element list: ',' or ')' expected.
But where?
I put the file to this Message.
Hi Marcel,
Try the below expression:
max({$<MeassureDate ={"=$(vActDate)"}>} Temperature)
Also makesure that the date formats are same when comparing.
Hope it helps!.
Thanks
Hi PriyankaSR,
I am getting values. But it is the values for the date, which I have selected in the list box "MeassureDate". But I wanted that getting the values for the date value in the variable vActDate be abgezeigt. Now I have set a 1 instead of the $, but it does not work. There is always the valid value from the list box ("MeassureDate" used to indicate Max (Temperature).
Do you have an idea for this?
Thanks.
Dear Marcel,
Just go to variable overview (Ctrl+Alt+v) and correct variable vActDate
=Date(Today())
Regards,
Kiran Rode
+91 8976977897