9 Replies Latest reply on Sep 15, 2014 3:47 PM by karenf

    "Retrospective" relationships - button problem




      I'm having issues with getting a button to work with related tables.


      I see the problem with both imported data and requests created within the database.



      When the "Request" button in the portal is pressed, I wish for the User to be taken to the corresponding request ie. 140707FC1 in the attached example

      The User is moved to the Requests layout - but to the last visited and not, the corresponding Request.


      The same goes for the CER/CAR button - but I'm still trying to figure this one out as I have yet to create a relationship.


      Any suggestions?




        • 1. Re: "Retrospective" relationships - button problem



          Incorrect title.  I initially thought my problem was isolated only to imported requests but new requests created within the database also fail to create an "active link".

          • 2. Re: "Retrospective" relationships - button problem

            Once again, could you provide specifics?

            What does this button do?

            If there is a script, what is the script?

            What do you mean by a link?

            • 3. Re: "Retrospective" relationships - button problem


              I just felt this is what the button may look like. Sorry for the humor.


              Are you using GoToRelatedRecord script step? This will allow you to got  directly to the related record and you can specify the layout to use for viewing the related record.


              It seems like you may be using GoToLayout, which could work if you were tracking the record ID of each related record and using it in the script. GoToLayout then GoToRecord/Request/Page.

              • 4. Re: "Retrospective" relationships - button problem

                Hi Bruce,


                In the "Users" layout, I wish to be able to access the full details of the "Request" via the Request button in the portal.


                The button, when pressed, should bring me to the related Request ie. for the example attached in my original post, the first "Request" button should bring me to the 140701FC1 request for room B.4.57.


                The button simply takes me to the Requests layout (done so via the "Go to Layout" option in "Button Setup").  I have been successful with such setups before but for some reason, can't get it to work here.  Upon opening, the last Request viewed comes up - not to the request corresponding to the portal entry.


                No script.  Just a simple "Go to Layout".


                Link - When a NEW request is created via the "New Request" button and the related records appear in the portal, it was my expectation that the "Request" button within the portal would work (ie. bring me to the corresponding record).  This, though, is not the case.  The button behaves as per the others (imported data).


                I hope this is more clear.

                • 5. Re: "Retrospective" relationships - button problem



                  Definitely catches the eye!!!!


                  If only it were easy for me - the aim is for it to eventually be!


                  You are correct, I have used GotoLayout as I didn't know how to get Go to Record/Request/Page to go exactly to the corresponding request.


                  Could you enlighten me (perhaps with a mock script)?




                  • 6. Re: "Retrospective" relationships - button problem



                    Thanks very much, BT.


                    It worked!

                    • 7. Re: "Retrospective" relationships - button problem

                      I think the easiest thing for you to use in your button setup is GoToRelatedRecord. It is a bit below GoToLayout in the list. Selecting it you will find the options to select the related table and the layout to use. You will end up liking this script step. Very handy and used all the time with portals.




                      Go To Related record [From table: "Admin CERCAR Requests"; Using layout: "User CERCAR Requests"]

                      • 8. Re: "Retrospective" relationships - button problem

                        The go to related record script step is very useful.


                        Note that you could have used a script also; with only a slight variation on the set variable / set field method you have already learned.


                        I forget what you are calling the primary key of your Request record so this is "psuedo code":


                        Set Variable[ $requestID; request record primary key ]

                        Go to Layout [ User CERCAR Requests ]

                        Enter Find Mode

                        Set Field [ request record primary key; $requestID ]

                        Perform Find


                        (do not turn on the "restore" option for either of the find statements.)

                        • 9. Re: "Retrospective" relationships - button problem

                          Hi Bruce,


                          Very much appreciated!


                          I shall keep this for future reference.


                          - Karen