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

Start and End Values

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

    Start and End Values

    The attached images is an embedded browse from a child table in a set.

    In this particular table there will never be more than 12 records and at the end of 12 months these records will be stored (appended) to another table. Hence after December, the year starts all over.

    In Jan I want to capture the PIF value and place it "somewhere" that it can be used as a value in a calculation. This number should remain constant throughout the 12 months

    Starting in Feb, and in each subsequent month through Dec, I want to capture the a new value in the PIF column and store it "somewhere" to be used in a calculation with the Jan value. I do not want this value to change until he next month (record) is added to the browse. The new month can replace the old value. Also, if the value in the field were to change for that given month I would like it to update also.

    The calculation would be the latter value minus the former value, hence a net gain is determined.

    I have tried the use of variables and posting to a child table even but I cannot figure out how to really make the changing value portion work.

    Help is appreciated

    #2
    Re: Start and End Values

    Originally posted by Mortie View Post
    In Jan I want to capture the PIF value and place it "somewhere" that it can be used as a value in a calculation. This number should remain constant throughout the 12 months
    Store it in a 2nd table, perhaps?

    Originally posted by Mortie View Post
    Starting in Feb, and in each subsequent month through Dec, I want to capture the a new value in the PIF column and store it "somewhere" to be used in a calculation with the Jan value.
    Store it in the same 2nd table, two fields?

    Originally posted by Mortie View Post
    I do not want this value to change until he next month (record) is added to the browse. The new month can replace the old value. Also, if the value in the field were to change for that given month I would like it to update also.
    So, if I understand you, replace the 2nd value in the 2nd table as needed?

    Originally posted by Mortie View Post
    The calculation would be the latter value minus the former value, hence a net gain is determined.
    So, 2nd table: Field2-Field1; where:
    Field1 remains static for the year and Field2 changes as needed.

    If that is the case, I don't think you need to make it be a child table, just a table "linked" w. xbasic. It's hard to understand your scenario completely - e.g., where do the calc results display?
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com


    Comment


      #3
      Re: Start and End Values

      Originally posted by Peter.Greulich View Post
      Store it in a 2nd table, perhaps?
      I have tried this but cannot seem to get the posting to work. I can get the start (Jan) value to post (in a field called Start_Pif but have not been able to figure how to get the last record entered to post in a second field, End_Pif.

      Originally posted by Peter.Greulich View Post
      So, if I understand you, replace the 2nd value in the 2nd table as needed?
      Yes, replaced when a new month is created by adding another record in the table/fields shown in the browse. Also it should change if the last created record in this table is changed/edited

      Originally posted by Peter.Greulich View Post
      So, 2nd table: Field2-Field1; where:
      Field1 remains static for the year and Field2 changes as needed.
      Yes, and in the case of the browse in the image it would be

      470-389, which is 81.

      Originally posted by Peter.Greulich View Post
      If that is the case, I don't think you need to make it be a child table, just a table "linked" w. xbasic. It's hard to understand your scenario completely - e.g., where do the calc results display?
      I want to display the net number (389-470) on the same form as the browse in the image. There are several other browse on this same form; once I know how to do this calculation I can complete it for the remaining data in different tables.

      "linked" w.xbasic is not something I have dealt with before.

      Comment


        #4
        Re: Start and End Values

        Bob:
        these records will be stored (appended) to another table.
        This seems hardly necessary as the original table only has 12 records. But if you have to do that for some other reasons, then use lookup() expression to lookup the values from the second table.

        I believe this could also be accomplished with variables and posting, but the expression seems to be the simplest approach.

        To expand on my first comment:
        What happens after the second and subsequent years?

        After the first year, you appended 12 records to the second table.
        What happens after the second year? do you append another 12?

        If so, this mean the second table will have 24 records, the first 12 relate to the first year, the second 12 relate to the second year. And if so, there must be some other identifier for the year. And if so, why can't you keep all the records in the original table and use that identifier of the year?

        Or, will you overwrite the records of the first year with those of the second year?
        And if so, what is the point of having two tables each holding a max of 12 records?

        Comment


          #5
          Re: Start and End Values

          Originally posted by G Gabriel View Post
          This seems hardly necessary as the original table only has 12 records. But if you have to do that for some other reasons, then use lookup() expression to lookup the values from the second table.
          The only reason I have a second table is because that is the only way I could figure out the posting process. I believe now I can at least get the first record to post to an additional field in the data table. If I could figure out how to get the value into a second field I would do as you suggest, use one table.

          Originally posted by G Gabriel View Post
          I believe this could also be accomplished with variables and posting, but the expression seems to be the simplest approach.
          I agree but cannot yet figure out how to get that new/last record value into a variable that I can then post to the other field. That is the insight I need.

          Originally posted by G Gabriel View Post
          After the first year, you appended 12 records to the second table. What happens after the second year? do you append another 12?
          Yes that is correct. There will be no posting of data to the archive table though

          Ultimately this is a sales record/sales report card application. The end result is to be able to compare current year with any previous year and try to do it on one form versus loading cascading pages. Hence I felt it was best to enter and display current year records from one table and use a different table(s)/set(s) to make comparisons. This is probably bulky but given my plodding way of developing an application (for my own work efforts) it is the best I could come up with for now.

          Comment


            #6
            Re: Start and End Values

            Bob:
            Rather than providing you with an example that might not co-incide with your design, it would be best if you can zip your DB.

            Comment


              #7
              Re: Start and End Values

              Gabriel

              I have been doing my work in V8. Will that work for you?

              Comment


                #8
                Re: Start and End Values

                It should.

                Comment


                  #9
                  Re: Start and End Values

                  here is my db as of today.

                  only one primary table record and 12 records in the child tables. The only tables that will be used as to posting are auto and fire. The others do not need this process.

                  Thanks for our help
                  Last edited by Mortie; 01-31-2007, 10:11 PM.

                  Comment


                    #10
                    Re: Start and End Values

                    Bob:
                    Taking a quick look at your DB, you have a separate table for each policy type then all linked in a set to the agent.

                    You only need two tables:
                    One for Agents,
                    The other for policies.
                    Add to the Policy table a field to identify the policy type whether life, Auto etc.
                    Once you have that, then you could use dbcount() & dbsum() to calculate the number of policies for each agent for each year.

                    Comment


                      #11
                      Re: Start and End Values

                      Originally posted by G Gabriel View Post
                      Bob:
                      Once you have that, then you could use dbcount() & dbsum() to calculate the number of policies for each agent for each year.
                      Thanks Gabriel for the information. I don't think the suggestion fits the application though. It is very tough, I know, for developers using the forums to look at a business need application and grasp the terms, processes, purpose, etc. The number in the auto and fire PIF field is already a total number for that particular policy type and does not needto be summed or totaled. My objective is to calculate the gain (or loss) between the start of the year (Jan) and each subsequent month through Dec. The NB fields I do use a calculated value to sum the totals for the year. hence, the PIF field is really the only one I need Net numbers for.

                      Comment

                      Working...
                      X