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

Calculated fields refresh...

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

    Calculated fields refresh...

    Hi, I have a problem with the live refreshing of a calculated field (via field rule).

    This is the situation:

    In my NewInvoice form a combo box called InvoiceType settled with a particularly value (Pvalue) has an OnChange action that gives to a StartingDate and to an EndingDay default values.

    I also have a field, calculated in field rules, that gives NumberDays (expression: EndingDay-StartingDate).

    Now:

    -this last field (NumberDays) is shown to user and is really important for all calculation expressions in the form.
    - this field automatically changes value switching the combo box or changing date values BUT TO THE PREVIOUS VALUES!
    - Live updating is only working if I save the record or switch to Design mode and back to Form view.

    I really need user can view immediately the result of changing date values in the other calculated fields. Is this a bug???I don't think so...please help me:)

    #2
    Re: Calculated fields refresh...

    Luca,

    Do you really need to store a calculated value for this field. If the other fields are stored ( startingdate and endingdate) then just have the calculated field on the form then it will update whenever the starting and ending dates are changed.

    If you need it to be on a report as well just do another calculated field there as well

    Comment


      #3
      Re: Calculated fields refresh...

      I prefer to store it, but is not strictly necessary...
      Do you think is the only way to solve this problem? There isn't any function to live recalculate the field?

      Thank you a lot.
      Luca

      Comment


        #4
        Re: Calculated fields refresh...

        I highly concur that calculated fields should not be stored, but if you must, you can use the

        <TBL>.RECALC_CALCFIELDS()

        function in the OnChange event for fields that affect the outcome of the calculated field, and then refresh the calculated field on the form.

        Question. Other than redefining the calculated field(s) for each Form, Browse and/or Report, why do you feel the need to store them?

        Comment


          #5
          Re: Calculated fields refresh...

          Thank you very much Melvin!

          I prefer to store them because I need that calculated field (number of days) to be easily viewed from the embed browse, default browse and form. now and when the users have to check the archive. It is really important that they catch with a glance the number of days...so they make less mistakes!

          What do you think about?

          Another question. I think my software is a little gone. Sometime crashes down and have problems with some operations and posting function. Do you think is a good solution reinstalling Alpha? Which is the procedure with license and serials?

          Bye!

          Comment


            #6
            Re: Calculated fields refresh...

            FWIW: In my opinion, the words "default browse" and "default form" have no place in an application designed for someone else to use. When you give someone access to either of these, you are (a) essentially giving them permission to do anything and go anywhere they want and (b) requiring them to learn how to use A5 rather than just providing them the functionality they need.

            Most users really don't want to learn to use A5; they just want to get their job done. Worse yet, what happens when a new person or temporary help comes in? Most companies don't like the idea of utter chaos for a week or two, or maybe a month or two, while a new/temporary employee learns the ropes. (OK, some chaos is inevitable but why make it any worse than necessary?)

            I use the default browse and form during development and troubleshooting and, very rarely, I use them in applications that are designed for my own use. Note "very rarely" - right now I can't think of a single place where I've done that as a part of the actual application. I find it more time efficient in the long run to automate even my own processes because I know that I will not remember all the details of how each thing is supposed to be done when a number of days, or even months, could elapse between uses. (Heck, sometimes all it takes is a couple chaotic hours!)

            I also don't use browses. I DO use embedded browses on forms and in some cases those browses are nearly as big as the whole form but by putting them on a form it's easy to put other things - particularly buttons - on the form to help the user and not require them to get any training or ask for help when using it the first time.

            Since I don't use the default form and don't use plain browses at all, putting calculated fields on the forms makes perfect sense. And, they refresh immediately when any related field is changed.

            Comment


              #7
              Re: Calculated fields refresh...

              I highly agree with Cal. Under no circumstances should users have access to default forms or browses.

              Perhaps you do not realize how easy it is to just point users to custom forms? In form design, just click Form, Form Properties... and in the Form tab, you can specify a Companion Browse.

              Likewise in Browse design, Click Browse, Browse Properties... and in the Browse tab, you can specify a Companion Form. Then when users toggle with F8, the with see forms with the calculated fields.

              As for your software being "a little gone", you need to be careful that this is only an Alpha Five problem. If you are having problems with other applications, then just reinstalling A5 will not help. Also, be sure you have the latest patch, which is now 3117. Most of the time, just installing the latest patch solves the problem. If you do have to reinstall, then BACK UP, BACK UP, BACK UP all your databases and tables before uninstalling A5. Then uninstall from the Control Panel. Reinstalling is straight forward. Just use the same license # as before. A5 will then register itself again. If you do have any problems with licensing after reinstall, just call Alpha Software and they will help you.

              Comment


                #8
                Re: Calculated fields refresh...

                Thank you guys! I agree with you two. I'm new to Alpha but already understood most of the things you told me.

                Regarding the default forms I really don't use them. About the default browse unfortunately I need to use it because having problem with opening companion forms. An error message tells me there isn't any "BrowseName" in the form! I think this is one of the bugs I told you.

                For the calculated field in the table you are right. But I use it for the embedded browses (that I told you..) and for calculating other fields from field rules. It's not really essential for my application but maybe sometimes useful.

                The backup that you suggest before uninstalling it's the zipping tool of Alpha? can you tell me witch is the difference with the backup tool??

                Thanks again...

                Comment


                  #9
                  Re: Calculated fields refresh...

                  Originally posted by lucasushi View Post
                  The backup that you suggest before uninstalling it's the zipping tool of Alpha? can you tell me witch is the difference with the backup tool??
                  Luca,

                  It doesn't matter how you backup your tables & sets.
                  You can
                  1. Copy them to another directory
                  2. Use the Windows Backup Wizard
                  3. Use A5 backup
                  or use any other backup method.

                  Just make sure you have a good backup of your choice before you uninstall.

                  Comment


                    #10
                    Re: Calculated fields refresh...

                    Sorry Melvin, I am trying to apply the function you told me
                    <TBL>.RECALC_CALCFIELDS() , the <tbl> parameter is right and even the field name but an error window tells me that doesn't finds the Variable.

                    It's this function pointing to a Variable? And why I can't find it in the Help file?? You know something I don't know...

                    Comment


                      #11
                      Re: Calculated fields refresh...

                      You need to have a pointer to the table. Per the instructions something like this:

                      Dim tbl as P
                      Tbl = table.open("customers")
                      Tbl.recalc_calcFields()
                      Tbl.close()
                      Jeffrey Wolfe

                      Open Source Solutions
                      Phone: (757) 819-4230
                      Fax: (888) 300-5994
                      E-mail: [email protected]

                      Comment


                        #12
                        Re: Calculated fields refresh...

                        One of the reasons that I like to use a stored calculated field versus a form level calculated field is the refresh time associated with form calculated fields. I have been working on an application for the last year and i finally resorted to stored calculated fields. It seems that the more calculated fields a form has the slower the data entry. I haven't been able to find a way to speed it up and the delay was killing the response time of the app. I wish we could turn off the "auto calc" on a form and do a refresh to calculate on demand.
                        Jeffrey Wolfe

                        Open Source Solutions
                        Phone: (757) 819-4230
                        Fax: (888) 300-5994
                        E-mail: [email protected]

                        Comment


                          #13
                          Re: Calculated fields refresh...

                          Thanks but I think is not working wile the table is open.

                          I even can't see that calculated fields refresh so easily....

                          Comment


                            #14
                            Re: Calculated fields refresh...

                            Originally posted by lucasushi View Post
                            <TBL>.RECALC_CALCFIELDS()
                            It's this function pointing to a Variable? And why I can't find it in the Help file?? You know something I don't know...
                            It is in the help file exactly as you typed it in..........


                            <tbl>.recalc_calcfields()

                            Did you perhaps search for

                            tbl.recalc_calcfields() instead?
                            There can be only one.

                            Comment


                              #15
                              Re: Calculated fields refresh...

                              Ok ok now I got it. I was looking for it with the Search function of help file (last tab)..

                              Comment

                              Working...
                              X