1 2 Previous Next 20 Replies Latest reply: May 22, 2013 1:07 PM by ScriptMan Go to original post RSS
      • 15. Re: Display Today's Date
        ScriptMan
        Where exactly does this code go? That is what I'm struggling with.
        • 16. Re: Display Today's Date
          ScriptMan
          As with the earlier suggestion, where exactly do I put this code? Under what event, for what object?
          • 17. Re: Display Today's Date
            AlexLiu
            Just put it in your Dashboard script. When the Dashboard is invoked (by selecting it form the drop-down), it will run this script thru along with your other scripts.
            • 18. Re: Display Today's Date
              WVanSluys
              where you put the script depends on what approach you are using to get the date.

              if you are using JavaScript method as shown in my previous post you can set the properties of a Text Box or Text Label from the OnStartup (of the bqy) event or the OnActivate (of the Dashboard) event.

              If you are using the SQL method you will need to script the query which has the date column in to process first before doing the GetCell().

              My usual approach is to run parameter queries in OnStartup and this may include a query for specific Dates (today, data as of, etc)in some cases i will cast the Date to Char so I do not have to mess with formating in the JavaScript. I do this in startup because this information needs to be refreshed only once. This way if follow the DRY approach...Don't Repeat Yourself

              As I do not know what else you are doing with your Dashboards it is difficult to recommend more. If you have multiple dashboards with same objects you might think about creating a Global Function that can be called in the OnActivate event.
              • 19. Re: Display Today's Date
                ScriptMan
                Works great now. Exactly what I wanted. Thank you!!
                • 20. Re: Display Today's Date
                  ScriptMan
                  Excellent. I used this in my solution. You're help was invaluable ! Thank you
                  1 2 Previous Next