6 Replies Latest reply on Jul 5, 2012 12:23 AM by weedonpaul

    how do i remove blanks from a list

    weedonpaul

      Title

      how do i remove blanks from a list

      Post

      HI i have a script that creates a list but it also creates blanks is there anyway i can remove blanks.

        • 1. Re: how do i remove blanks from a list
          philmodjunk

          What kind of list? A series of records? Posting the script might help.

          To post a script to the forum:

          1. You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
          2. You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
          3. If You have FileMaker advanced, you can generate a database design report and copy the script as text from there.
          4. If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
          • 2. Re: how do i remove blanks from a list
            weedonpaul

            it's not the most eligant in the world but i'm teaching myself.

            • 3. Re: how do i remove blanks from a list
              philmodjunk

              OK, but if you don't describe what you are trying to do in more detail, it's pretty much impossible to help you. Posting the script is one way for others to see what you have tried so far. You might even get a few pointers on how to improve your scripting. Wink

              • 4. Re: how do i remove blanks from a list
                weedonpaul

                sorry i thought i uploaded a picture for some reason i tried to upload a pdf

                • 5. Re: how do i remove blanks from a list
                  philmodjunk

                  Ok, this is not a script, it's a calculation. And you appear to want a list of numbers separated by returns. The list function can be used to produce your list of values and it will automatically drop out null (empty) values when it does so.

                  Please note that this entire calculation looks a bit strange--especially using PatternCount in this manner, but you could use it with the list function if you rewrote it like this:

                  List ( If ( E.Europe = 0 ; PatternCount ( ListOfRegions ; "E.Europe" ) ) ;
                          If ( W.Europe = 0 ; PatternCount ( ListOfRegions ; "W.Europe" ) ) ;
                          If ( //and so forth...
                        )

                  • 6. Re: how do i remove blanks from a list
                    weedonpaul

                    you are a star.

                     

                    If you think thats a mess you should see the whole database. I'm teaching myself as I go so it lacks planning. It's a bit like building the 'Empire state building' on the foundations for a "bungalow"