7 Replies Latest reply on Mar 23, 2011 10:40 PM by $Nith$

    Offline

    ditto9888 Level 1

      Hi, I am using LiveCycle ES2.5 Turnkey install.

       

      If I put the "Process Fields" group on my form, when the form comes up in the WorkSpace, there is an "Offline" button at the lower-left.  I can click that button and save the form as a PDF file, and I can operate the PDF form outside the WorkSpace.  It all works great.

       

      My question is, is there a way for my Javascript (inside the form) to tell if the form is currently in the WorkSpace (online) or if it is currently "offline"?

       

      thanks

        • 1. Re: Offline
          $Nith$ Level 4

          I don't think this is possible.

           

          All the necessary information such as Task Id, Available Routes etc will be updated on the process fields and the form gets reader extended to submit from outside the workspace.

           

          May I know why do you need that information?

           

          Nith

          • 2. Re: Offline
            ditto9888 Level 1

            The reason why I would like to know that is:

             

            suppose I have a button on the form that only works when the form is in the WorkSpace, so, when the user takes the form Offline, I would like to hide that button when he opens the form outside of the WorkSpace.

             

            and vice versa,

             

            I might want to put something on the form that only makes sense when the user is operating the form outside the WorkSpace.  I would like to hide those things when the form is launched inside the WorkSpace.

             

            thanks

            • 3. Re: Offline
              $Nith$ Level 4

              I have tried several options but couldn't find a solution yet.

               

              Nith

              • 4. Re: Offline
                Doug E Johnson

                Would this be a possible solution?:

                1. The form assumes its offline by default.  You could have a hidden form object that would be set to indicate this (true/false.. 0/1.. 'offline'/'online'.. whatever).

                2. In your workspace process for that form, you could have a preparedata process that would set that hidden object to online.

                3. The javascript on your form could then check that indicator and logically determine if its online of offline.

                • 5. Re: Offline
                  $Nith$ Level 4

                  I was also thinking about the similar solution. The problem here is, when you save the Offline form to the file system, the hidden information set by the Prepare Date process will still be there. So the Javascript will assume that its an online form. Got my point?

                   

                  We can still play with this approach using timestamp verification; i.e the form rendered time & the javascript execution time must be same (with slight negotiable duration). Do you think this will workout?

                   

                  Nith

                  • 6. Re: Offline
                    Doug E Johnson Level 1

                    Yes, I understand your point.  How about setting your indicator back to offline on the pre-save event of the form?  The form must assume by default that its offline unless its opened by the process.  Once the form is saved, its considered offline... yes?

                    • 7. Re: Offline
                      $Nith$ Level 4

                      Yeah, the pre-save event gives a way to go..

                       

                      Nith