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

    #16
    Re: Calculated fields refresh...

    Originally posted by lucasushi View Post
    I even can't see that calculated fields refresh so easily....
    Don't forget. After you do <tbl>.recalc_calcfields(), you still have to refresh all calculated fiellds on the form.

    Comment


      #17
      Re: Calculated fields refresh...

      But when I run the code Alpha gives me an Unknown Dos Error. I think is because I am actually using the table to recalc, and this should be closed

      I think the only way to see live refreshment is using calculated fields...

      I will maintain my stored calculated fields and only use layout Calc fields for the form.
      Last edited by lucasushi; 10-17-2007, 11:34 AM.

      Comment


        #18
        Re: Calculated fields refresh...

        Originally posted by lucasushi View Post
        But when I run the code Alpha gives me an Unknown Dos Error. I think is because I am actually using the table to recalc, and this should be closed
        I think you do not correctly understand what must be done and your code is incorrect. However, we cannot fix what we cannot see.

        If you want further help, you need to attach a zip with exact instructions on how to duplicate your problem.
        eg: which button contains the code you think will redo the calculated fields, and the indication that shows it's bad and what it should be when it's good.

        eg:
        1. Open form <someform>
        2. Left Click this
        3. Right Click that
        4. Promenade
        5. Bad -Note that everyone has left the barn
        6. If it had worked, you would have three dancing partners.

        Comment


          #19
          Re: Calculated fields refresh...

          Sorry but my zipped file is too big. It is 10 mb.

          I will explane to you better.

          In a form based on the table "t_invoice" I have a calculated field "ndays" (ivoice_to-invoice_from)

          In the date field "ivoice_from" I have added on the OnChance event 2 actions:

          - the inline Xbasic with this code:

          Dim tbl as P
          Tbl = table.open("t_invoice")
          Tbl.recalc_calcFields()
          Tbl.close()

          - Refresh Object (s) pointing on "ndays" field.

          Now if I change the date Alpha gives me this Error window:

          Script:OnChange line: 13
          Tbl.recalc_calcFields()
          [Unknown DOS Error] t_conto.dbf

          This is all.....
          Tell me if you have any questions...

          Comment


            #20
            Re: Calculated fields refresh...

            Originally posted by lucasushi View Post
            Sorry but my zipped file is too big. It is 10 mb.

            Script:OnChange line: 13
            Tbl.recalc_calcFields()
            [Unknown DOS Error] t_conto.dbf

            This is all.....
            Tell me if you have any questions...
            Lucas,

            You do not have to zip the entire database, just the table with the form that is giving the problem. If that is too big, then make a copy of the table with just a few records.

            First, try replacing
            Tbl = table.open("t_invoice")
            with
            for the Form�s session
            Tbl = table.current()

            and comment out
            'Tbl.close()

            The DOS error you are getting does not make any sense, but until I/we see the entire script it cannot be fixed. Please attach a zip we can work with and information with exact steps to duplicate. Until you do that, we cannot progress this problem any further.

            Comment


              #21
              Re: Calculated fields refresh...

              The DOS error you are getting does not make any sense, but until I/we see the entire script it cannot be fixed.
              Especially since it references another table. Possibly a lookup() calculation problem?

              Wonder what happens if he right clicks on the t_invoice table in the control panel, chooses Edit Field Rules, chooses the Rules menu, Find Errors in field rules choice?
              There can be only one.

              Comment


                #22
                Re: Calculated fields refresh...

                if I check errors of field rules : "No error found"

                if I make Melvin's change i have this error:

                "Command does not work in change or enter mode"

                But now I'll zip the files for you...

                Comment


                  #23
                  Re: Calculated fields refresh...

                  Ok let's try.
                  Everything is in italian but this should not be a problem..

                  The pass for adm is "lz"

                  On the starting menu you have to click on "Conti" (Invoices) that is based on set_clipre. (For the control panel you can click on the button in the bottom)

                  You now have a read only form with all the invoices of Mr. UNO (not the extras browse but conti browse).

                  -If you click on the second "+" button over the browse (or button "Nuovo") this will open a companion form (f_conti_new) based on the table t_conti.
                  This is the form I need to refresh wile filling with new data. And that only has calculated fields by field rules.

                  -If you click on the first "+" button over the browse (the one with written "calc" near) this will open a companion form (f_conti_new_) based on the table t_conti but with calculated fields for the keys fields.

                  Entering data in the form consist in choosing the type of invoice ("tipo") and then insert the date that he haven't filled out automatically.

                  This form can be used only to view how much the invoice total amounts, without saving. So I need that results are viewed immediately.

                  I think problem with fields are with date fields and/or with automatically "set field values" because for example if you choose from the invoice type "ultimo conto" or "scadenza" and you insert a value for the tel "al" field, the field "tot tel" automatically updates! and without any problem!

                  tell me if you have questions
                  Bye and thank you



                  ps. I even have problems inserting custom browses in the form f_riporti, and using companion form with them...

                  Comment


                    #24
                    Re: Calculated fields refresh...

                    Lucas,

                    You refer to a field ""tot tel". I cannot find that field on the form. Did you really mean "tot telefono"?

                    Here are a few quick observations.
                    When I review form f_conti_new_ in design mode, select the OnChange event and then try to edit any of the Set Field Values, I get an error as attached in set_field_error.jpg.

                    I am guessing you copied and pasted from form f_conto_new, instead of just redefining in the real current form.
                    Generally speaking that is not good. You should redefine those actions based on the actual form you are editing (f_conti_new_).

                    Another problem is that in form f_conto_new, you are trying to do Tbl.recalc_calcFields(), but you have not tested to see if change or enter mode has been initiated. You need to do a tbl.change_end or tbl.enter_end before you can do Tbl.recalc_calcFields(), if either of those conditions exist.

                    Looking at the form properties for f_conto_new & f_conto_new_, you have them set to system default, it would probably be best to set them to modal instead, and have buttons to allow change and enter.

                    That is all for now. I will investigate further tonight when I get home.

                    Comment


                      #25
                      Re: Calculated fields refresh...

                      Thank you very much Melvin for looking with so attention my work (first work!)...

                      The telephone fields I mean are "tel_fine" and "tot_telefono". This last one has the rule "(tel_fine-tel_inizio) * price" and is fast updating as I edit one of the two fields.

                      For the error window, you are right. I just copied the form layout to the same table with a different name. But this was just to try the result replacing calc fields.

                      The condition you told me to verify is new to me :o ...never had this kind of problems and new to programming....I will study this...

                      You are finally right regarding to the modal view. I am waiting to finish the application and then set all security modes...

                      ....you didn't told me about the 2 versions of conti_new. I am thinking to cancel f_conti_new and use only the f_conti_new_ version .....

                      ty and Bye

                      Comment


                        #26
                        Re: Calculated fields refresh...

                        I really can't understand why if I put an embedded custom browse in a form based on a set (that includes the table I want to browse), I get error if trying to open companion form using action script.

                        The error window says this:
                        "Browse object is not bound to a one-to-many child table."

                        Specifically I am trying to put the browse "b_pagamenti" based on table "t_pagamenti" in the form "f_riporti".

                        Comment


                          #27
                          Re: Calculated fields refresh...

                          Originally posted by lucasushi View Post
                          I really can't understand why if I put an put an embedded custom browse in a form based on a set (that includes the table I want to browse), I get error if trying to open companion form using action script.
                          The term I have bolded is somewhat a contradiction. You can customize an embedded browse but you cannot embed a saved named browse. Once you have placed a saved named browse on a form, you no longer have the option to switch to the companion form for an embedded browse, because it is not embedded.
                          There can be only one.

                          Comment


                            #28
                            Re: Calculated fields refresh...

                            So do I have an alternative way to utilize action scrips for adding or viewing a record focused in the named browse?

                            Comment


                              #29
                              Re: Calculated fields refresh...

                              Originally posted by lucasushi View Post
                              So do I have an alternative way to utilize action scrips for adding or viewing a record focused in the named browse?
                              Switching to the companion form may be the simplest because it is built in but I see nothing to prevent you from opening a saved form to the current record.
                              There can be only one.

                              Comment


                                #30
                                Re: Calculated fields refresh...

                                there is nothing if I had to open a form to the current record of the parent table, but if I want to open a form to view a record selected in the child saved browse?

                                And if I want to open the form (based on the child table) to insert a new record that is all blank for except for the id?

                                Comment

                                Working...
                                X