Hello everyone!
I have a noob question here. I am experimenting around with using the date selector function inside the page source code. I have got that working to the point that I can display the UTC value I want from the date selector function. This is great, but now I need to use that number elsewhere in the application.
How do I get access to this variable? I tried using the scope function, but I couldn't get that to work (I could very well be using it wrong). Is there a way I can reference or store or output this variable from the page code?
For reference, I am using a steady state application, and the page code uses simple script blocks I pulled from the documentation. Here is my sample code:
[
Title = "OverviewLabel";
Color = "<FFFFFFFF>";
Shared StartDate;
ShowCalendar;
]
Main [
Return(Self);
If !Valid(StartDate);
[
StartDate = Today() * 86400;
]
If GUIButton(100, 200, 200, 150,
1, 1, 1, 1,
1, 0, 0, 1,
0, 68, 2, 0,
7, 15, 8, 0,
0, 0,
\GetPhrase("ChangeLabel", \GetPhrase("ChangeLabel"
, _DialogFont,
2, 1, 0);
[
ShowCalendar = 1;
]
\DateSelector(ShowCalendar, 200, 200, &StartDate);
ZText(400, 100, StartDate, 3, 0);
]
The ZText is just filler to for me to see that the DateSelector function is working the way I expect. I need that StartDate variable.
Also (this may be unrelated) but when I tried to open the properties of the created widget on the page from this code, I got this error: (You cannot view the properties of this graphic as the source code is no longer compliant.)
Thank you in advance!