This discussion is archived
1 2 Previous Next 20 Replies Latest reply: May 22, 2013 11:07 AM by ScriptMan Go to original post RSS
  • 15. Re: Display Today's Date
    ScriptMan Newbie
    Currently Being Moderated
    Where exactly does this code go? That is what I'm struggling with.
  • 16. Re: Display Today's Date
    ScriptMan Newbie
    Currently Being Moderated
    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 Explorer
    Currently Being Moderated
    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 Pro
    Currently Being Moderated
    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 Newbie
    Currently Being Moderated
    Works great now. Exactly what I wanted. Thank you!!
  • 20. Re: Display Today's Date
    ScriptMan Newbie
    Currently Being Moderated
    Excellent. I used this in my solution. You're help was invaluable ! Thank you
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points