Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Parameters for scripts?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Parameters for scripts?

    Just a couple of basic questions.

    1. Can you pass parameters to scripts? If not, what is the workaround... global variable?

    2. Are scripts preferred over functions? I think I read this somewhere, but not sure why this is.
    John J. Fatte', CPA
    PRO-WARE, LLC
    Omaha, NE 68137

    #2
    Re: Parameters for scripts?

    John - are you using the Search function on this board? I think you'll find a wealth of information on these and many of the other questions you ask.
    -Steve
    sigpic

    Comment


      #3
      Re: Parameters for scripts?

      Originally posted by Steve Workings View Post
      John - are you using the Search function on this board? I think you'll find a wealth of information on these and many of the other questions you ask.
      Yes, I did use the search and I found a wealth of information that talks about parameters, but all dealt with functions, nothing related to scrips.

      I also did a search trying to find out whether there is a preference for scripts vs functions and did not find anything specific. I believe I found this information on another A5 related site.

      Is there something wrong with asking SPECIFIC questions that in turn may help resolve issues for other developers?

      BTW, if you use my "topic" as your search terms, you get NO messages found!
      John J. Fatte', CPA
      PRO-WARE, LLC
      Omaha, NE 68137

      Comment


        #4
        Re: Parameters for scripts?

        Ira Perlow has published lot of info about scripts vs. functions, and I think has more on his site.

        Functions accept parameters, scripts do not, so variables can be a good solution depending on your needs.
        -Steve
        sigpic

        Comment


          #5
          Re: Parameters for scripts?

          Originally posted by Steve Workings View Post
          Ira Perlow has published lot of info about scripts vs. functions, and I think has more on his site.

          Functions accept parameters, scripts do not, so variables can be a good solution depending on your needs.
          Thank you for your response. I was just on Ira's site since I sort of remember reading an article on his site regarding scrips vs functions. I believe his suggestion was to use scripts instead of functions, but can't really remember why. Worse, I can't find the article either. I'll keep looking unless someone knows where it's at.
          John J. Fatte', CPA
          PRO-WARE, LLC
          Omaha, NE 68137

          Comment


            #6
            Re: Parameters for scripts?

            http://www.csda1.com/csda_codeutilit...functionscript

            Comment


              #7
              Re: Parameters for scripts?

              John:

              Assuming that your wish is to have variable values available (carried over) from one script to another, your basic choices are to:
              (1) Dimension variables as either shared or global (depending on the situation) where they are then available within the session (shared) or to all of Alpha (global).
              (2) Dimension the variables (without making them shared or global) and, if you then want to launch a new script but have those variables available, use script_play_local("Scriptname") which will use the same variable space as the script which called it.

              Generally speaking, it's easier to do this with functions and you don't have the issue (should you wish to have several actions to run consecutively) where the timing of the scripts becomes an issue. Encapsulating the action in a function ensures that Alpha will complete that action before proceeding.

              And I'm pretty sure that Ira recommends functions over scripts everywhere!
              Finian

              Comment


                #8
                Re: Parameters for scripts?

                John,
                Your statements/question brings to light something that many new users (and maybe older ones too!) should think about. I know this question was not directed at me personally but I don't think Stan should have to spend his valuable time with half of what he answers!!....that's the job of us lesser mortals!! :D

                So here is my "rant" !

                Is there something wrong with asking SPECIFIC questions that in turn may help resolve issues for other developers?
                Nothing inherently wrong...the issue is that this messageboard, as it is used as a knowledgebase, would become unnecessarily bloated with the answers to the same repetitious questions.....and when the limited time of "helpers" here is taken up with such questions, it takes away from the new or relatively obscure ones.

                IMO there must be a large difference in what users feel is due diligence in searching. If I have an issue (and believe me I have MANY!!) that I need a solution for, I first search my help files, then Alpha's help, then the messageboard, then LearnAlpha (and other sites). This has many times taken between an hour and has literally taken up an entire day or so for complex problems.

                Almost all my problem's have been answered already and I usually find them by searching. Take a look at the 4000+ posts I have to see how many questions I personally have asked since starting with Alpha (well under 20). Believe me, this is not due to my being smarter than most....it is the perseverance in knowing that most likely the answer is out there waiting to be found.

                I really do not expect everyone to spend the amount of time I do in searching out a solution....I spend this amount of time in order to further my Alpha knowledge as when searching for one answer, I almost always invariably find answers to unasked ones as well. Developing search skills is a must in order to find solutions.

                So how long should one spend??? This has been asked many times on the board as well and, of course, there is no one answer as everyone has a different idea of this. If I don't think someone has spent AT LEAST an hour searching, I figure the problem is not critical and I will spend my time helping out with other problems....just my opinion and thoughts FWIW.

                Ok, done ranting.... :)
                ==========================================================================
                ==========================================================================
                Regarding Functions...not only more easily maintained by the developer, but functions also pretty much get rid of any timing issues that can occur----and I have found many!

                Have fun!!!
                Mike
                __________________________________________
                It is only when we forget all our learning that we begin to know.
                It's not what you look at that matters, it's what you see.
                Henry David Thoreau
                __________________________________________



                Comment


                  #9
                  Re: Parameters for scripts?

                  I kind of agree with Mike but the problem many new users have is knowing the correct terminology to use when searching. In addition to this there are so many places to search because of how fragmented Alphas documentation has become over the last few years. The first time I looked at the help files and reference material I was overwhelmed and didn't really have a clue where to start. I started to pick up tips from previous posts on the board. For instance in the alpha 5 help index;

                  Try putting a '.' or '*' in front of the word you are searching.

                  Also try searching with 'A_' or 'A5_' as the prefix.

                  Little things like this improved my results of finding things for myself.

                  I too have spent many hours searching the documentation and forum for solutions and techniques. Not always as successful as Mike and I fail miserably at recording those findings. I know he keeps a wealth of examples for future reference. Recently I have learnt the lesson of documenting my code and having a rem statement for virtually every line no matter how simple it appears to be at the time. As I tend to use Alpha only periodically I found I would go back to something I had done a few months (maybe only weeks or days) ago and have to search through line by line to figure out exactly what I had done and why I had done it that way.

                  I suspect many of the long term users have grown with the documentation and benefit greatly from it. For the new user though it can be like finding a needle in a haystack and this forum acts like a huge magnet to pull it out. I for one am always grateful of the time and effort members put into answering my questions.

                  That being said Mike is right that it will benefit you more in the long run if you can spend time familiarising yourself with the different parts of the documentation. Since V8 new features have not made it into the help file so always check what's new in V8, V9 and V10. I'm still learning to do that successfully myself but I can already see it pays dividends.

                  Comment


                    #10
                    Re: Parameters for scripts?

                    How does an UDF do what you want it to do?

                    Comment


                      #11
                      Re: Parameters for scripts?

                      Originally posted by MikeC View Post
                      John,
                      Your statements/question brings to light something that many new users (and maybe older ones too!) should think about. I know this question was not directed at me personally but I don't think Stan should have to spend his valuable time with half of what he answers!!....that's the job of us lesser mortals!! :D

                      So here is my "rant" !

                      Nothing inherently wrong...the issue is that this messageboard, as it is used as a knowledgebase, would become unnecessarily bloated with the answers to the same repetitious questions.....and when the limited time of "helpers" here is taken up with such questions, it takes away from the new or relatively obscure ones.

                      IMO there must be a large difference in what users feel is due diligence in searching. If I have an issue (and believe me I have MANY!!) that I need a solution for, I first search my help files, then Alpha's help, then the messageboard, then LearnAlpha (and other sites). This has many times taken between an hour and has literally taken up an entire day or so for complex problems.

                      Almost all my problem's have been answered already and I usually find them by searching. Take a look at the 4000+ posts I have to see how many questions I personally have asked since starting with Alpha (well under 20). Believe me, this is not due to my being smarter than most....it is the perseverance in knowing that most likely the answer is out there waiting to be found.

                      I really do not expect everyone to spend the amount of time I do in searching out a solution....I spend this amount of time in order to further my Alpha knowledge as when searching for one answer, I almost always invariably find answers to unasked ones as well. Developing search skills is a must in order to find solutions.

                      So how long should one spend??? This has been asked many times on the board as well and, of course, there is no one answer as everyone has a different idea of this. If I don't think someone has spent AT LEAST an hour searching, I figure the problem is not critical and I will spend my time helping out with other problems....just my opinion and thoughts FWIW.

                      Ok, done ranting.... :)
                      ==========================================================================
                      ==========================================================================
                      Regarding Functions...not only more easily maintained by the developer, but functions also pretty much get rid of any timing issues that can occur----and I have found many!

                      Have fun!!!
                      MikeC

                      My turn to rant:
                      ***********************
                      Your point is well taken, except for one thing. Not one reply referenced a posting on this board. If the issue had been previously addressed, why post a reply instead of just providing a link to the posting????

                      Why not provide a search term(s) that would provide the answer that I was looking for?

                      As I stated, I did what I felt was a pretty extensive search trying to find a clear cut answer to my question including a search for "parameters" which did not yield the answer I was looking for... that is, that scripts do NOT allow for parameters.

                      If the point of using what's here instead of adding to it (bloating the message boards), then why do we criticize the person asking the question instead of criticizing the person post a response (instead of provide a link to the solution)????

                      I'm coming from another development language that had a forum where people would literally compete to try and provide the correct answer. Seems like here people go out of their way to deter people from asking questions that are more easily answered by the more experienced uses than the help file, obsolete documentation, etc.
                      ************************
                      End of rant.
                      John J. Fatte', CPA
                      PRO-WARE, LLC
                      Omaha, NE 68137

                      Comment


                        #12
                        Re: Parameters for scripts?

                        The question is:
                        Originally posted by jjfcpa View Post
                        Are scripts preferred over functions?
                        And the answer is?

                        Comment


                          #13
                          Re: Parameters for scripts?

                          Thank you for the link Ernie.
                          John J. Fatte', CPA
                          PRO-WARE, LLC
                          Omaha, NE 68137

                          Comment


                            #14
                            Re: Parameters for scripts?

                            I also did a search trying to find out whether there is a preference for scripts vs functions and did not find anything specific.
                            OK John, Here is a link:

                            http://msgboard.alphasoftware.com/al...light=function

                            Mike C makes a point that is hard to assimilate when you are frustrated with having spent a good while searching for something but have not been successful. It feels at times that acquiring the skills of searching for answers in the docs, on this board and other resources becomes a secondary learning curve atop the learning the program and the functionality of the program. BUT! The real truth is....it is all one basket. The learning how to use the functionality of the program, the specific terms of the application and the language needed to communicate specifically about A5, the construct and content of the documentations, how to search the message board, where to find answers when exhaustion has manifested. It is all one basket, and I applaude Mike C in his understanding that it is one basket, and I have watched him seriously mature with his knowledge with my knowing well he digs and dig deep. As do others (I exclude myself because my frustration tolerance is low). In that digging the ascent in the learning curve is delivered. But the frustration is high! Has been for me.

                            BTW, I do not have a fondness for the search capabilities of the message board. You can search the message board for that and find that out.
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment


                              #15
                              Re: Parameters for scripts?

                              It's ironic, as a result of this thread I've spent the last couple of hours reading this thread, the other thread mentioned just above and the external references re - UDF's and Naming Conventions. So for me, this thread has been extremely useful as I'm still at the stage of correlating Access/VBA with Alpha Five.

                              -------

                              Steve.
                              Steve
                              Alphafive V10

                              Comment

                              Working...
                              X