1 Reply Latest reply on Dec 20, 2012 4:24 PM by philmodjunk

    Script update not showing and relationship tables

    snimmo

      Title

      Script update not showing and relationship tables

      Post

           I have two issues that I think might be related. First, I have a script;

                if [Score By Hole::Score Type = "Birdie"]

                   Set Field [Score By Hole::Gross Score[CourseHole::Par - 1]]

               Else if [Score By Hole::Score Type = "Boggie"]

                  Set Field [Score By Hole::Gross Score[CourseHole::Par + 1]]

               Else

                  Set Field [Score By Hole::[CourseHole::Par]]

              End If

              Commit Records / Requests []

           -------

           Don't really know if I need the commit statement.

           Anyway, the debugger indicates the logic is working in the script as it seems to be firing off and going through code. I am not, however, seeing any change in the layout display for the Gross Score field even though the debugger shows it going through the set statement.

           The second issue which may be related is that the value for Par is from a related table that goes through about five tables in the relationship graph before the two are connected. My question on the relationship is - Am I better off create more less complicated relationships than trying to have one humongus relationship that ties everything together. I'm not sure I understand whether you can have multiple relationship graphs without causing overhead or confusing the system. There are a lot of tables in this database that tie together but in trying to minimize data I have created quite a few tables that tie together with ids from the other tables.

           Thanks for your help.

            

        • 1. Re: Script update not showing and relationship tables
          philmodjunk

               The extra pair of brackets in your set field steps reveal that you haven't set up these steps correctly:

               

                    Set Field [Score By Hole::Gross Score[CourseHole::Par - 1]]

               those brackets tell me that you used the button for specifying a repetition number where you should have clicked the "calculated result" specify button.

               When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

               

                    Am I better off create more less complicated relationships than trying to have one humongus relationship that ties everything together. I'm not sure I understand whether you can have multiple relationship graphs without causing overhead or confusing the system.

               YES you will be MUCH better off if you use less complicated relationships. Not only will they be much easier to "debug" when something doesn't evaluate as expected, they can evaluate much more quickly with fewer potential screen refresh issues. I almost never reference a table more than twice removed from the current layout's table.

               The trick to doing this is to use multiple Tutorial: What are Table Occurrences? in an Anchor Buoy format.