1 2 Previous Next 16 Replies Latest reply on Jan 4, 2017 11:52 AM by bigtom

    PSoS - can't get started with it

    troy4444

      I have a script called Trigger,

      that trigger Performs a Script on the Server Called Server,

      that script goes to a global values layout that has one record and sets a field (let's call it variable) which is not a global field to "After"

      then in the original Trigger script

      I go to the global values layout and set a global variable to the field that was set and display that variable in a dialog.

      - no workee....

      If I run the 'Server' script unto itself it works, it set the field to "After"

      but running the Server script from the Trigger, it doesn't work.

      I'm sure I'm missing something very basic here.

      Any help is appreciated.

      I've attached screenshots of the two scripts

       

      Trigger

      Screenshot 2017-01-04 12.53.37.png

      Server

      Screenshot 2017-01-04 12.51.33.png

        • 1. Re: PSoS - can't get started with it
          philmodjunk

          The values in global fields are specific to the current user. A script run on the server does not have access to those values. You'll need to modify the script and your PSOS script call to pass that data in a script parameter expression to the script instead of trying to reference global fields.

           

          Note that "current layout", "current record", "found set", "sort order" is likewise specific to the user and will not be automatically recreated for the "server side" script. If that "context" is needed for your script, you also have to recreate it as well.

          1 of 1 people found this helpful
          • 2. Re: PSoS - can't get started with it
            troy4444

            the field in not global, so the PSoS should have access to that field, to my understanding.

            To be clear, my global values layout is a one record layout, and nothing is a global field, where I store values that are loaded into the 'real' global layout upon opening the DB.

            • 3. Re: PSoS - can't get started with it
              philmodjunk

              Not necessarily. Note my comments about "context".

              • 4. Re: PSoS - can't get started with it
                troy4444

                noted,

                On the server side, I added go to record [first] although it shouldn't need that since there is only one record on that layout.

                still not working.

                 

                Should I not be able to set a text field to desired text with PSoS when:

                the field is on a layout that has only one record,

                the field is not global,

                the Server side script does:

                goes to the layout

                shows all records

                goes to the first record

                sets the field to "After"

                commits the record

                • 5. Re: PSoS - can't get started with it
                  philmodjunk

                  It should work. If you perform the script client side does it work?

                  • 6. Re: PSoS - can't get started with it
                    bigtom

                    Variable Use 01 is not a global field? Just a standard text field?

                     

                    If it is a single record layout you may still want to be very specific when using PSOS With some thing like

                     

                    show all records

                    go ro record (first)

                     

                    It looks like you are just setting a field with PSOS and then using the server set value to update a global variable On the client.

                     

                    Have you considered that if the client is sitting on the layout the single record may be locked and server cannot modify it? You may also need a refresh on the client window data to grab the latest update from the server.

                     

                    I would suggest capturing any server side errors and passing them them back to the client.

                    1 of 1 people found this helpful
                    • 7. Re: PSoS - can't get started with it
                      troy4444

                      that's the thing, yes it works like a charm.

                      Is there some setting in Server admin? some security thing that is obvious that I've overlooked?

                      It's killin' me.

                      I've never gone over to use PSoS because I could never get it to work, so now i've had it and want to know what's going on, there's tons of things I could use it for.... but I can't get it to work at the most basic level, like set a field to text.

                      • 8. Re: PSoS - can't get started with it
                        troy4444

                        bigtom, thanx for the eyes,

                        good shot at being on the layout and refresh,

                        Closed the second window on the client with that layout on it, and did a refresh on the server side, still, no smiley face.

                        • 9. Re: PSoS - can't get started with it
                          troy4444

                          ok, getting error 112 back, which is 'window is missing' so I thought, OH, DUH, I have to make a new window on the server side, but still to no avail,

                          in fact the new window step has the text VIRTUAL WINDOW ON WEB in soft grey, so it's not compatible with server...

                          progress though>

                          thoughts?    

                          • 10. Re: PSoS - can't get started with it
                            bigtom

                            Can you provide some info on the client you are using, server version and how it is hosted?

                             

                            This is usually a super simple process.

                            • 11. Re: PSoS - can't get started with it
                              philmodjunk

                              Is the PSOS script in the same file as trigger? Is the file with this "global layout" open at the time you perform the PSOS?

                               

                              One of the more irritating limitations of PSOS is that the files used by the PSOS script must first be open client side before you perform the server side script.

                              • 12. Re: PSoS - can't get started with it
                                bigtom

                                Do you have any server incompatible script steps in an OnFirstWindowOpen script? This can cause trouble. Try adding a bypass to the open script if you have one.

                                 

                                An example:

                                If (PatternCount(Get(ApplicationVersion); "Server")

                                exit script

                                EndIf

                                3 of 3 people found this helpful
                                • 13. Re: PSoS - can't get started with it
                                  troy4444

                                  Thanx Tom,

                                   

                                  Client 15.0.2

                                  Server 15.0.3

                                   

                                  New iMac, Server hosted, and client on same cpu.

                                   

                                  Sidebar: does ODBC/JDBC need to be on, on the Server? (just something I saw, that I don't use, - a thought)

                                  • 14. Re: PSoS - can't get started with it
                                    troy4444

                                    WOOF- =)

                                    there you go man,

                                    it was the first window open script, great call!

                                    I guess I can keep that open script but check the username at the top and if it's the server do nothing, and if it's the client continue to perform the script... ???

                                    But at least you got me started man.

                                    MANY thank you's really.

                                    1 2 Previous Next