6 Replies Latest reply on Dec 7, 2013 12:46 PM by MartyGlenn

    GTRR Based on a Conditonal Vlaue List

    MartyGlenn

      Title

      GTRR Based on a Conditonal Vlaue List

      Post

           Hello

           I have a problem that I think is simple.  I have created an invoice estimate file for an invoice solution.  There are two drop downs:  The first is based on a simple value list and it is called categories.  The second is a list of related items based on the category field.

           What I am trying to do is create a GTRR from the portal row that will display specific documentation related to the second conditional value list.  Now in my portal I do get, when I click my current button with attached script all records in the found set and when the script is complete and I look at the found set it shows the first record as active view but say for example in this case I selected the second portal row but it does not show that record, blah blah blah...

           It seems no matter what relationship I do, since the second field that you select is based on the conditional value of the first field (Category) that I cannot get the GTRR to see or the relationship to work. Obviously when there is only one record in the portal row it works perfect.

           To help me solve the issue I add the portal row PK field and the second field FK but it doesn't help me understand the proper relationship.

            

           Another issue is the relationship is based on a concact calc field so I get the warning and I am concerned that that has something to do with the problem but it seems to display the correct data.

           Thank you.

           Marty

            

      Screen_Shot_2013-12-07_at_8.29.18_AM.png

        • 1. Re: GTRR Based on a Conditonal Vlaue List
          philmodjunk

               The error message shown does not have anything to do with the Go To Related Records (GTRR) script step. The problem is that the second field is not an indexed field. If you change the value list settings so that you show and sort values from the first field, you will not get this error message, but the value list may not display the values the way that you want them to display.

               You'll need to figure out a way to get c_course_name to be an indexed field. This could be difficult to do if it is a calculation that refers to data in a global field or a field from a related table. Sometimes an auto-entered calculation can be used and sometimes it takes careful scripting to get the correct value in place for use in such a value list.

          • 2. Re: GTRR Based on a Conditonal Vlaue List
            MartyGlenn

                 The c-course_name is your basic "FirstName & " " & LastName" type calc. So ok.  But on the GTRR from the little blue button to show GTRR records from TO I class I and I class details I are you saying the GTRR does not know exactly what RR I want so it displays all three records in the portal and then displays the first record as active?  And of course this would explain why when there is only one record in the portal it of course by dafault gives the correct GTRR record?

                 Marty

            • 3. Re: GTRR Based on a Conditonal Vlaue List
              philmodjunk

                   All I said, was that the error message that you showed in your first screen shot did not seem to have anything to do with a GTRR script step. Whether or not GTRR works will depend on the context in which it is used, the relationships defined, and the parameters you specify for the script step. The only affect your value list will have is what value it enters into a match field of the relationship specified in the script step. The first field value is what is entered into the match field so the second field value does not affect this except whether or not it enables the user to select the correct value.

                   What options did you select for the GTRR step?

              • 4. Re: GTRR Based on a Conditonal Vlaue List
                MartyGlenn

                     OK. Thanks.

                     If you look at the original TO and RG I have tried every single related connection I can think of and no matter what I always get all three records in the found set with the first record (Portal Row) being the shown record in my GTRR search or find.

                • 5. Re: GTRR Based on a Conditonal Vlaue List
                  philmodjunk

                       The New Window step is changing the focus so that it is no longer in the portal row where you clicked the button and makes no sense in this context. Remove that step and your script should work. If you want to see the results in a new window, use the new window option that is part of the GTRR step.

                  • 6. Re: GTRR Based on a Conditonal Vlaue List
                    MartyGlenn

                         You have been on this board for years if I am not mistaken. Very well done.  Thank you.  I have used FM since 1995 and love it and hate it at the same time. I wish I knew all the little nuances...

                         Thanks for taking the time, I hope my posts were clear and made it easy to help.

                         Marty