7 Replies Latest reply on Mar 5, 2014 5:05 PM by DavidR

    Alternating Background Colors In Lists View

    DavidR

      Title

      Alternating Background Colors In Lists View

      Post

           hey everyone,

           i need a little help simulating green bar paper in list view...Im stuck on FM6 so the following link steps do not work for me... i need an creative way to accomplish this if at possible..

           http://help.filemaker.com/app/answers/detail/a_id/424/kw/alternating%20row%20color

           THANK YOU!

        • 1. Re: Alternating Background Colors In Lists View
          philmodjunk

               I strongly recommend that you upgrade to a newer version as soon as possible. You are reaching a point where you risk a scenario where your current hardware fails and all new hardware refuses to run software that old.

               But we were doing stuff like this long before we had the options found in current versions, but it's not near as simple.

               Define a global container field. While in layout mod, draw a rectangle of the color you want for your alternate color. Copy it to the clipboard.

               Return to Browse Mode and paste it into the container field.

               Then Define a calculation field and select Container as the result type. Use this type of expression:

               If ( Mod ( Get ( RecordNumber ) ; 2 ) ; gYourContainerFieldHere ; "" )

               If Mod is not a function in FileMaker 6, let me know and I'll post an alternate expression.

               Place this calculated container field on your layout behind your other fields. You can format this field to "enlarge and reduce image to fit" and you can clear the "maintain proportions" option to get the field to fill edge to edge with color.

               With this in place, the field will return a color only for odd numbered rows of your list view.

          • 2. Re: Alternating Background Colors In Lists View
            DavidR

                 for some reason it does not like the expression maybe cause it is an old version... or i am a baffoon.. it looks like mod is a function but a generic get function is not...i attached some of the functions....

                 If ( test , result one , result two )

                 Mod ( number , divisor )

                 GetField ( field )

                 GetNextSerialValue ( dbname , fieldname )

                 GetRepetition ( repeating field , number )

                 GetSummary ( summary field , break field )

            • 3. Re: Alternating Background Colors In Lists View
              philmodjunk

                   Check for a function that starts with Status instead of Get. At some point in the evolution of FileMaker calculations, they renamed the status function to be the get function. FileMaker 6 may be old enough that this is the case in your version.

                   I don't recall which version made the change but the function might be status ( CurrentRecordNumber ) or some such. You'll need to search FileMaker help.

              • 4. Re: Alternating Background Colors In Lists View
                DavidR

                     Hey Phil,

                      

                     Sorry it has taken me so long to get back... i found a status (Currentrecordnumber) and replaced it where get was used... for some reason fm6 does not like semicolons at all and yells this field is not valid where ever they are... so i changed them to be commas and it accepted the expression but it did not achieve the desired result.  below is the expression that is in the calculation field...

                     If( Mod( Status(CurrentRecordNumber) , 2 ) , GBP , "" )

                      

                     any further assistance you can provide would be greatly appreciated!

                      

                     Regards

                • 5. Re: Alternating Background Colors In Lists View
                  philmodjunk

                       Yes, the older versions used commas where we now use semi-colons. The syntax of your If function looks correct. Make sure that "container" is selected as the result type for this calculation.

                       If that doesn't resolve things, I would suspect that other parts of what needs to be set up has not been set up correctly. "did not achieve the desired result" is too vague for that to help me suggest where there might be something to change. What exact results are you getting at this time?

                       Is GBP a global container field? Have you pasted a colored rectangle into it?

                  • 6. Re: Alternating Background Colors In Lists View
                    DavidR

                         No it wasnt on container... it is now...

                         No it wasnt a global container.... it is now...

                         Yes I did copy a colored rectangle in the box...

                         Ill see how it works in a min or so! ill keep ya posted!

                    • 7. Re: Alternating Background Colors In Lists View
                      DavidR

                           You Are Awesome! Thanks for your help revamping a database from 01'.  I could not have done it without you!..

                           oh and it works now! looks great!  Everything is AWESOME....