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

Interesting Append Situation

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

    Interesting Append Situation

    Hi there,
    I just converted (in the process of)to A5 from A4v6. I have a very complicated Excel spreadsheet which I effectively duplicated in A4. My normal procedure would be to get everything correct in the spreadsheet, then save the spreadsheet as a DBF file.

    The DBF file contained the exact field names as the A4 database, so I could tell A4 to match up the fields by field name. I only appended fields that were not calculated in A4. I would then filter down to the "just appended" records and re-calculate them. This procedure worked flawlessly in A4 every time. (My database always calc'd out to the same result as the spreadsheet.)

    When I tried to do this in A5, I saved the spreadsheet to DBF as normal, then I added the DBF to the A5 database. I then tried to run an "Append Operation" to append the records to the main table.

    When I ran the Append operation, it errored out and said that some field types were not matching. A4 always took the data and converted it to A4 data types. (For instance, date fields came in as text and A4 converted them to dates.)

    If anyone followed the whole post above, my question is: What is the best way to append data in A5? Has anyone else ever tried this sort of thing? Is there a better way to do it?

    Thanks,
    George

    #2
    RE: Interesting Append Situation

    George, If I understand your question, you have an excel spread that you ultimatley want to get into matching A5 tables. We do this by first using an import operation that will import the spread sheet data into a NEW table. Before creating the import, make sure the first row of the spread sheet has field names. When filling out the import card you can assign field types, lengths, etc. You will also want to check the box that says first row contains field names. Save this operation and run it. You will now have a new table with field names and corrcet field types that should be very easy to append into the final table. The reason we always import into a new table and then append to the master is to catch any import errors that may occur. If for some reason a field just won't import correctly we make the corrections in the new table records prior to the append to the final destination table. By saving all of the operatons needed to get the data to its final table you can create one button that will run them in sequence for future imports and appends. If your master table contains the calculated fields and formulas needed, they will not need to be appended if the data fields are supplied that make up the calculated fields result. In other words if you have a calculated field that adds field_1 + field_2 and you supply the values for field_1 and field_2 your calculated field will do the rest. If you still have a problem with field mismatches using this method, post again and I'll tell you how we get around that too!
    Jeff

    Comment


      #3
      RE: Interesting Append Situation

      Thanks for the reply Jeff.

      I'm trying it now. I'll let you know if I have any more questions. Thanks again.

      George

      Comment


        #4
        RE: Interesting Append Situation

        Well, I tried importing but I'm getting an "invalid field type" error or something like that. It tells me to look at the Trace Window, but there is nothing there...maybe I didn't activate it or something.

        Where do I go from here?

        Thanks, George

        Comment


          #5
          RE: Interesting Append Situation

          I'll let Jeff work with you on the Append but try scrolling the Trace window UP. This isn't exactly 'intuitively obvious' but it's probably the problem. The trace window seems to come up to a blank screen at the end of the text.

          Comment


            #6
            RE: Interesting Append Situation

            George, Can you mail me a copy of the excel spread you are trying to import with just about 10 records in it? I'm sure we can trouble shoot it much quicker if I had a copy of it. If you want to mail it send it to [email protected] and I'll look at it and get back to you today.
            Jeff

            Comment


              #7
              RE: Interesting Append Situation

              George, I have looked at you spread sheet and was able to import and append the 3 worksheets off of the LISTCPM. I think where you are having your trouble is in the version. Alpha V cannot import excel ver 7.0. You will have to, as I did, indivdually save the three worksheets in a 4.0 format. The LISTCPM looks as if it is summary sheet and cannot be imported due to the fact that some of the forumlas are not backward compatible to 4.0 but if all the other data is brought into a set via their individual tables I think your A5 form can recreate the LISTCPM sheet. When I imported I did so into new tables. You can then append from these into your master set.
              Jeff

              Comment


                #8
                RE: Interesting Append Situation

                One more thing. I was'nt sure what type some of your fields were supposed to be. If you have any trouble with import not bringing the field in correctly you may have to open the spread sheet and format the cells to the desired type. After the import open the new table structure and check for proper field types. Make sure your new import table and the master table are both built of matching field types.
                Jeff

                Comment


                  #9
                  RE: Interesting Append Situation

                  Jeff,
                  I think field types are my problem. I can load the DBF into A5; it is when I try to append it that I get into problems.

                  I think my Logical fields in A5 probably don't accept the "Y" or "N" that would come in from the spreadsheet--I may have to code them as True/False. Have you experienced this?

                  Also, when Excel saves the data, it seems to assign field types based on the first record. Some of my formulas in Excel are IF statements with the "THEN" portion changing the value to a blank. =If(IsNumber(A1),A1,""). Even though I had some numbers in this column, the first row contained a blank and I think Excel evaluated the field to a Character type.

                  I noticed that all my Yes/No fields were also Character. I thought I could get around this by converting field types during the append process, but I couldn't figure out how to do it. So far I only have the PDF users manual and it didn't seem to help.

                  George

                  Comment


                    #10
                    RE: Interesting Append Situation

                    George, You can convert fields during the append operation right on the append card. I'm not sure what you need to convert but the following is an exmple of a character to numeric conversion. In this case the year in the transaction table is character and is being converted to numeric in the master table.

                    year is the field
                    and
                    val(@Customer->year)
                    is the expression

                    This expression would be in the master table section of the card. I'm not sure about the calculated fields but I think you may have to have A5 recalculate those in you set or table. Maybe someone else on the board has some suggestions?
                    One other thing you might try is when create your append operation using the append genie, select, "Just show me how the card is filled out" when the genie is done. You can then place your cursor in the expression column of the card and arrow key down throught the expressions one at a time. Any expression that is going to cause an error will do so at that time. By doing this you can trouble shoot your fields one at a time and identify exactly which fields are giving you the trouble.
                    Jeff
                    PS Any suggestions welcome.

                    Comment


                      #11
                      RE: Interesting Append Situation

                      SUCCESS! Thanks for your help, Jeff. This is what I did: I changed my formulas in the spreadsheet to make sure they matched the types that are in the database. I modified my IF statements to return a 0 instead of a blank in numeric fields.

                      I also changed my logical fields to True or False. When saving to Excel 4.0, A5 was not parsing my fields properly, so I saved in Excel to dBase 4 and everything worked like a charm.

                      One final problem I have: I use brokers to order lists. Right now I use a Broker Name field. It is easy to mis-type a broker name. I'd like to refer to a broker code database and based on the code, fill in the broker name.

                      Ideally, I should create a set that references the Broker Table, so that I don't duplicate data, correct? But right now I do want to put the broker name into the main table.

                      What is the best way to do this?

                      Thanks, George

                      Comment


                        #12
                        RE: Interesting Append Situation

                        ALERT: Never mind about the lookup. I found a post addressing this topic using the LOOKUPC function.

                        I hope nobody went to any trouble regarding my last question.

                        George

                        Comment

                        Working...
                        X