2 Replies Latest reply on Oct 20, 2014 3:58 PM by flitcraft33

    PDSTorage Variable assignment and testing How does a N00b do it?

    flitcraft33

      I am a total Web Gateway N00b and I am trying to get PDStorage to work for me.

       

      I have two issues I cannot resolve.

       

      I want to assign a PDStorage value for a user to the present moment, I am using DateTime.ToNumber which is the unix epoch value in seconds.

       

      THEN, once I have this in PDStorage,  I want to test it to see whether 1800 seconds have passed by.

       

      In other words I need to have an event that creates a stored value fo the DateTime.ToNumber value (or that value + 1800, whch would be better)

      Than I need a criteria which checks the Current Date time against it.

       

      Any help would be appreciated.

       

      Thanks,

        • 1. Re: PDSTorage Variable assignment and testing How does a N00b do it?
          Jon Scholten

          Hi Flit,

           

          It sounds like you know what you want, are you just having problems figuring out what the events/criteria need to be?

           

          The event to set the PDstorage value would be something like PDStorage.AddUserData.Number('keyname', VALUE). Where VALUE = Current epochtime+1800

           

          To check the pdstorage value you would have a rule with the criteria of

          PDstorage.GetUserData.Number('keyname') less than DataTime.Tonumber AND

          PDstorage.GetUserData.Number('keyname') less than DataTime.Tonumber greater than 0

           

          I'll try to come up with a ruleset if I have some time later in the day. Let me know if that helps.

           

          Best,

          Jon

          • 2. Re: PDSTorage Variable assignment and testing How does a N00b do it?
            flitcraft33

            Thanks for responding so quick

             

            So heres what I have tried so far,

            I am using Erick's coaching rules, modified by him for me (Thank you Erik!) to coach with comments by URL categorizaion.

            When coaching for Pandora it doesn't work (due to how Pandora does stuff from what I can see)

            So I added the following Events when a coaching session starts for Internet TV/Radio

            Capture.PNG

            Then I added a rule to test if the time is up.

             

            Capture.PNG

             

             

            I am testing this now.  Eventually I will want to change from addint 1800 to 60* number of seconds in the coaching session settings, + 360* number of minutes in the coaching session setting + 21600* the number of hours in the coaching session settings.

             

            Thank you again, please let me know if this is going to work and why not (being pessimistic here!).

             

            Cheers,

            Dan S.