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

Invoicing totals

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

    #61
    Re: Invoicing totals

    I am hereby declaring this post closed. Problem solved. Code moved to Onexit event.

    Comment


      #62
      Re: Invoicing totals

      Originally posted by Ted Giles View Post
      Have a look around this Barry. Not exactly what you want but it might give you a lead.
      I created this as an example for another Forum user showing calcs on screen.
      Hi Ted,
      I have looked at the sample you posted and i noticed the menu at the left of the the appllication, it came out after i clicked the Launch application, how did you do it/How did you made it?being a beginner, i could not figure out how. Thanks!

      Comment


        #63
        Re: Invoicing totals

        Pull it apart and look at the code behind the buttons.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #64
          Re: Invoicing totals

          Control Panel
          Code tab
          Select Toolbar item and click Design at the top.

          We didn't get any further with the concertina style sub-menu on this did we Ted?

          Comment


            #65
            Re: Invoicing totals

            Yeah we did - well Robin did. She posted a superb example.
            (thought you were tied up stocktaking.)
            You getting' anywhere with that?
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #66
              Re: Invoicing totals

              Originally posted by Tom Cone Jr View Post
              Barry, I think it's a mistake to mix code as you are doing in post 47.

              First point:
              Xbasic permits your scripts to talk directlly to the table supporting your form. You do this with "tbl.balance", for example.
              Xbasic permits your scripts to talk to the table supporting your form INdirectly through objects in the forum layout itself. You do this with "C_balance.value"
              I think it's a mistake to mix methods in the same script. Use code that talks directly to the table throughout, or use code that talks indirectly throughout.
              Tom,

              I've been processing your suggestion for the past few days. I think I have it figured out....
              Is this analogy correct with regards to your suggestion above?

              If you're setting the index, and you're processing data within a table (via a script), do it this way:

              Code:
              dim tbl as P
              tbl = table.current()
              indx = tbl.index_primary_put()
              But if you're setting the index to work with the form itself, this method would be preferred:

              Code:
              parentform.index_set("invoice_number")
              parentform.find(invnum)
              Thanx in advance....
              Last edited by SNusa; 02-21-2012, 07:25 PM.
              Robert T. ~ "I enjoy manipulating data... just not my data."
              It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
              RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

              Comment


                #67
                Re: Invoicing totals

                Robert, that's it ! Thanks for the simple illustration.

                -- tom

                Comment


                  #68
                  Re: Invoicing totals

                  Originally posted by Tom Cone Jr View Post
                  Robert, that's it ! Thanks for the simple illustration.

                  -- tom
                  Sweet! So the only question remaining relative to this thread (in my mind at least) is: There must be a set of circumstances where you must resort to "form/table cross-coding."

                  ~If so, generally speaking ~ what might these circumstances be?

                  Actually, this also raises one more topic of concern: When working with a linked database (non-dbf) are you much safer (generally speaking) with your code "living exclusively within the form?" (relying on form based methods/properties as opposed to table based methods) ~ And what are the implications regarding choosing between ADO / AlphaDAO in this context?

                  FYI: For clarification, "form/table cross-coding" (mixing code) was discussed here in post #48.

                  PS: I realize this thread has "slipped" off topic, yet this question somehow still seems relevant enough to place here. (I intend to somehow link back to this from another pertinent thread).......
                  Last edited by SNusa; 02-23-2012, 08:31 AM.
                  Robert T. ~ "I enjoy manipulating data... just not my data."
                  It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                  RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                  Comment


                    #69
                    Re: Invoicing totals

                    Robert, yes, this is far afield. Worse you're asking about topics I know almost nothing about. I suggest you begin anew. -- tom

                    Comment


                      #70
                      Re: Invoicing totals

                      Originally posted by Stan Mathews View Post
                      Correct. That is the advantage of using a posting rule.

                      How else would the inv_hedr record know that the inv_detail linked records had changed? You could code the onsave event for the invoice form to recalculate the field rules for the inv_hedr table but that would process all records in the header table.
                      the problem here is when the child record is changed/updated the ONSAVE event for the FORM doesn't fire...

                      Comment


                        #71
                        Re: Invoicing totals

                        Originally posted by barry685 View Post
                        I am hereby declaring this post closed. Problem solved. Code moved to Onexit event.
                        This means you have to EXIT the invoice each time for the field to update, right?

                        wow, I have NO CLUE why these DATABASE companies have NOT made a FIX for ALL this... I have the same problem with Lotus Approach
                        Maybe we need a ONANYCHANGE method since the onchange doesn't fire UNLESS you PHYSICALLY type in the field - LOGICAL? NO, as to ME anytime an object CHANGES the CHANGE SHOULD FIRE...

                        Comment


                          #72
                          Re: Invoicing totals

                          I too would like the INVOICE total from the FORM to be STORED in the Invoice Header - tired of all the excuses of WHY would you store this information when it can be calculated.
                          I WANT it STORED, updated when the invoice is changed in anyway.

                          Still seems I'm working back in the 80's - NONE of these issue have been resolved since then.

                          HOW do I take the value FROM a calculated field on a FORM and UPDATE the value in ANOTHER field on the form (hidden or placed behind) the total invoice and get it to UPDATE the invoice header->invTotal
                          I've tried the onsave events for details and headers and it just doesn't work, I've been over this with Lotus in the past as well with same STUPID answer of why store it.

                          THESE ARE NOT ANSWERS

                          Comment


                            #73
                            Re: Invoicing totals

                            Originally posted by markusof View Post
                            I too would like the INVOICE total from the FORM to be STORED in the Invoice Header - tired of all the excuses of WHY would you store this information when it can be calculated.
                            I WANT it STORED, updated when the invoice is changed in anyway. Any chance of explaining why? Is it just "because" or do you have a valid processing reason? If you have, please share it so we can understand.

                            Still seems I'm working back in the 80's - NONE of these issue have been resolved since then. I think a lot of them have with Referential Integrity and Relational Databases.

                            HOW do I take the value FROM a calculated field on a FORM and UPDATE the value in ANOTHER field on the form (hidden or placed behind) the total invoice and get it to UPDATE the invoice header->invTotal
                            I've tried the onsave events for details and headers and it just doesn't work, I've been over this with Lotus in the past as well with same STUPID answer of why store it.
                            If you want to store this value in the Header, you need to have a calculated field, feeding a Variable, and a field in the Table which picks up the variable when there is a change. I've just done this for fun and I'm no coder but it really is quite simple Jeff.

                            THESE ARE NOT ANSWERS. Wind your neck in a bit and you will get help. Upper case sounds like you are shouting. Some contributors ignore any upper case such as yours Jeff.
                            See our Hybrid Option here;
                            https://hybridapps.example-software.com/


                            Apologies to anyone I haven't managed to upset yet.
                            You are held in a queue and I will get to you soon.

                            Comment


                              #74
                              Re: Invoicing totals

                              Code to retrieve calculated field value and place it into a variable/parent form-field object:
                              (where vxyTotals is the calculated field)

                              I think you could place this code on the canSave event of the form itself.
                              (and bind a field on the form to the variable vc_vxyTotals)

                              You might even be able to define vc_vxyTotals as a layout variable using V in a5 toolbar.
                              (and leave out the first line of code below)

                              Form canSave event:
                              Code:
                              dim shared vc_vxyTotals as N  '(variable to store calculated field)
                              vc_vxyTotals = [B][COLOR="#000080"]calculated_field_get(local_variables(),"vxyTotals").VALUE_GET()[/COLOR][/B]
                              'note:  you may also need to refresh the field here via: topparent:<FIELD>.refresh()
                              Another option would be to assign a hidden form field object value (which is bound to the header table) to the existing (displayed calculated field object) via it's .value or .text property. (Here again, again, you'll want to refresh form on the canSave event.)

                              With a touch of X-basic, (on the desktop side at least), you can do pretty much whatever you want with a5.

                              Notes:
                              Referential integrity is not generally suggested for multi-user scenarios. ~Due to record locking performance (freezing) possibilities.
                              Also, IMHO there's nothing wrong with storing this value in the header so long as it's not editable anywhere else..... Storage is cheap, and sometimes having this info saved in the header makes easier to do other things such as generate reports etc....
                              Last edited by SNusa; 03-23-2012, 12:25 AM.
                              Robert T. ~ "I enjoy manipulating data... just not my data."
                              It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                              RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                              Comment


                                #75
                                Re: Invoicing totals

                                Originally posted by SNusa View Post
                                Code to retrieve calculated field value and place it into a variable/parent form-field object:
                                (where vxyTotals is the calculated field)

                                I think you could place this code on the canSave event of the form itself.
                                (and bind a field on the form to the variable vc_vxyTotals)

                                You might even be able to define vc_vxyTotals as a layout variable using V in a5 toolbar.
                                (and leave out the first line of code below)

                                Form canSave event:
                                Code:
                                dim shared vc_vxyTotals as N  '(variable to store calculated field)
                                vc_vxyTotals = [B][COLOR="#000080"]calculated_field_get(local_variables(),"vxyTotals").VALUE_GET()[/COLOR][/B]
                                'note:  you may also need to refresh the field here via: topparent:<FIELD>.refresh()
                                This only works if you change something in the FORM after you've entered your details.. which is not how people work.
                                I already work with systems that, ah, you have to do this, then that, then this, cause that's the way it's written - I don't put out crap like that..

                                It's like when I was working at FORD, ah, pop up an error message in about 3 months so we can fix the program again..

                                Thanks for the reply, but it doesn't work anyway you put it, I emailed the guy that started the thread, that gave up and moved onto another product, WHICH I think I'm looking at as well..

                                Comment

                                Working...
                                X