7 Replies Latest reply on Dec 31, 2010 5:17 AM by rjlevesque

    Second set of eyes needed...

    rjlevesque

      Title

      Second set of eyes needed...

      Post

      Hopefully Phil is watching this thread...

      Attached is a solution I made for a friend. For some reason I cannot get the "Record XX of XX" working even though this is one of the most simple things to do, for some reason it is not working and I can't see why.

      Secondly, I am trying to get the total of all repair costs per item beside the portal that shows repairs for that item. Not working, not sure why. I am sure these are both stupid mistakes on my part but I need a second set of eyes to look please, been staring at the stuff too long now and can't find the issue.

      Thanks in advance for any help!  =)

      RJ

      FMP Solution - http://dl.dropbox.com/u/13556517/InventoryApp_v1.0.fp7

        • 1. Re: Second set of eyes needed...
          philmodjunk

          For total records, make the calculation unstored.

          AllRepairCost has several problems.

          Sum ( Field1 ) is the same as just typing in Field1.

          If you want to use Sum to compute the total cost in your portal, define it in the inventory table Sum ( Repairs::Cost ) will total up all the values in cost for all the repair records related to the current inventory record.

          You have this expression:

          Sum ( Cost ) = Inventory::kp_InvID

          Any time you use the equals operator like this, you are comparing the value on the left of the operator with the value on the right. If they are equal, the value returned is 1 (True). If they are not equal the value returned is 0 (False).

          If you want to compute the total using a field in Repairs, define AllRepairCost as a summary field that computes the total of Cost. You'll find that this field does not refresh as smoothly and quickly as Sum ( Repairs::Cost )--you may even want to use a script trigger to refresh the window after the cost field is exited if you use this approach.

          • 2. Re: Second set of eyes needed...
            rjlevesque

            Yep, all makes perfect sense! Thanks Phil!  =)

            • 3. Re: Second set of eyes needed...
              rjlevesque

              So tell me, overall how does the solution look so far though to you? Decent?

              If you have any suggestions I would love to hear them...

              • 4. Re: Second set of eyes needed...
                philmodjunk

                I just took a quick look at the two fields where you had a problem. Haven't looked it over beyond that. I may get time to look at it in more detail later today.

                • 5. Re: Second set of eyes needed...
                  rjlevesque

                  Thanks I would appreciate that. Trying to increase my skills to make my solutions as professional in design as in what they do. So any tips you got as far as functionality, or design, or any tips at all you may have would be greatly appreciated. 

                  • 6. Re: Second set of eyes needed...
                    philmodjunk

                    Looks pretty good. Most of what I'm commenting on is fairly minor:

                    Your scripts that use New Window trigger an awkward resize of the parent window on windows systems if the Parent window has been maximized. There's code you can add that checks to see if the current platform is windows and then takes steps to minimize this resize. Likewise, you can check to see if "enlarge window contents to improve visibility" has been checked and can adjust window sizes of pop-up windows accordingly. (This is a Windows only preference, I believe.)

                    What if a system has two monitors, several printers or more than one HDD? If you defined a portal to "components" you could list a more flexible number and type of system components.

                    I have a delete portal row script you might want to use. It's 100% portable as it has no layout, field or table specific references, confirms the delete, but doesn't execute if the delete button clicked was located on the bottom blank "add" row of the portal. And the one script can be used for all your portals. (The layout/table/field specific data is passed in a script parameter.)

                    You can import this script from the Known Bugs List. It also has scripts you can look at for opening new windows that deal with the two issues I've mentioned above.

                     

                    • 7. Re: Second set of eyes needed...
                      rjlevesque

                      Downloading the known bugs list now. That script sounds awesome, and thanks for the pointers on the resize. You have no idea how much I appreciate your input on these boards! =)

                      Hope you had an excellent holiday Phil!