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

Posting a calc'ed result from form to table

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

    Posting a calc'ed result from form to table

    I have a multi-tabbed form in a Job-costing app that has a calc'ed result that is basically the sum with additional markups of 7 other imputs from various fields and embedded tables on the various tabs. It's just the total cost of the job. I need that value in a variety of other reports and forms, but because it's just a form calculation I can't "see" it when I creating these reports and building expressions or placing fields from the various related tables. So far I've just recreated the formula in each report where it's needed but it sure would save a lot of time it I could figure out a way to post that calc'ed result to a table that is keyed with the job docket # when the entry is saved. I forseen a 2 field table with just "docket_number" & "total_jobcost" for the fields. Can this be done?

    It also would solve another problem - I'm getting errors of a penny or two in many of the re-calc's, so one re-useable value should stop that problem.

    One other thing about this: specific job dockets often get re-visited with revisions or additions, so if the total cost value changes I need to also figure out how to re-post to the same line in the posting table as having two different totals for the same job docket number would wreak havoc.

    Any ideas sure would be appreciated.

    #2
    RE: Posting a calc'ed result from form to table

    Bill,

    How about something like this?

    If you force the user to push a 'save record' button on your form, that button's script could be used to open the new posting table, begin entering a new record, assign values to the two fields, end entering the new record, and then close the new posting table.

    You could use a logical variable with your form to track whether the current transaction is new or an edit to an existing transaction. If it's new, you follow the sequence above. If it's an edit, you add logic to the script to search for the previous entry in the new posting table and then 'change' it instead of entering a new one.

    -- tom

    Comment


      #3
      RE: Posting a calc'ed result from form to table

      Bill:
      another idea (which we use frequently), is to place the parent table field i.e., "total" on the form and set the properties to "hidden". Create an onsave event to set the value of that field to the value in the calc->total field.

      Comment


        #4
        RE: Posting a calc'ed result from form to table

        We also track job costs by our internal part number. This cost accounting factor is based on various other calculations such as material, overhead, outside costs, labor direct and indirect, scrap rates etc. etc. etc. We process these figures on a monthly basis (min) and use a Summarize feature to create a table containing all the part numbers, each with its asscociated detailed costs.

        During the rest of the month when sales quotes new orders they can get the base price to quote using the figures from the previous month.

        The reason I use a summarize to create a table and not by an individual record post, is that if a constant value in the calculation changes, such as a material surcharge, the entire summary table is updated at the same time. Not just when someone changes and saves a record.

        Mick

        Comment


          #5
          RE: Posting a calc'ed result from form to table

          I'm still working on solving the problem of "posting" the results of a calculation on a form back into a field in the table the form is tied to. The attached sample works and is based mainly on John Lemisch's idea from his msg # 56274. The onform calc is "ProdTotal" and the field in the table that it gets saved to at Onsave is ProdCosts_Total. As per John's idea I put the ProdCosts_Total field on the form but with "Hide" set in its property sheet.

          But a minor problem comes up with this method - if there are any markups or adjustments made to Production Costs they don't show up on the form until after it's been saved. Is there another event rather than Onsave that I could use to trigger the post? Maybe an OnArrive into the ProdCosts Markup field? Better yet would be if I could make it happen as soon as Calc->ProdTotal was any value greater than 0. This would mean that it would update/change as the user tabbed thru and entered numbers in the subtotal fields that supply the values for the calculation but I don't see a problem for that - is there?

          One other problem with this sample - I can't get negative values to work in the ProdCosts Adj field (eg., -.1 which is a 10% discount for the customer). Any ideas about why it doesn't work?

          Thanks for all the help with this.

          Comment


            #6
            RE: Posting a calc'ed result from form to table

            Hi,

            Two comments. If you want to fire a script, why don't you put it in the CanExitForm event on the form?

            Second, your -.10 will work if you lengthen the field in the table stucture from 4 to 6 and do the same on the format of the field on the form.

            Regards,

            Jay Talbott
            Jay Talbott
            Lexington, KY

            Comment


              #7
              RE: Posting a calc'ed result from form to table

              Thanks for the help for all of this. I did wind up using the post to a hidden field from the master table and just changed the event to ONDEPARTing the browse table entering line items that are getting calc'ed. Sure cleaned up the number of calc's done in the forms and made the final totals match throughout all forms and reports. And thanks for the info on getting negative amts to both work & display correctly

              Comment

              Working...
              X