1 Reply Latest reply on Sep 4, 2012 1:39 PM by philmodjunk

    Asking user to input a number of days to graph

    YvesAllard

      Title

      Asking user to input a number of days to graph

      Post

      Hello,

      I am a new user making great progress thanks to this forum.

      I would like to graph my data by day but would like to have the user select how many days from today going back they would like to graph.  The data graphed are simple counts of records grouped by days.

      I already have the graphs but it always shows all the days available as I do not know how to restrict the days. 

      thank you.

       

        • 1. Re: Asking user to input a number of days to graph
          philmodjunk

          Put a global number field on a layout or as the input field for a custom dialog, then use a script to find the records for this date range.

          Let's say your global field is named Globals::gNumbDays...

          Go to layout [Specify chart layout here]
          Enter Find mode [] ---> clear the pause check box
          Set Field [YourTable::YourDateField ; Get ( CurrentDate ) - Globals::gNumbDays & "..." & Get ( CurrentDate ) ]
          Set Error capture [on]
          Perform Find[]
          Sort Records [Restore ; No Dialog ]