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 error

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

    Posting error

    Can someone help explain why I get this error when I perform posting operation. It happens inconsistently.

    Here's the error:
    Error running Post Operation
    Variable post.m_exp1 expression - Field not recognized.

    Thanks,
    Willie

    #2
    RE: Posting error

    It sounds like the expression for the master table (post.m_exp1 expression) is using a variable that hasn't been initialized. For example, if you start the program and run the post, you get the error, but if you've been using the program for a while, you might have initialized the variable somewhere else, and then the operation will work.

    Comment


      #3
      RE: Posting error

      It does makes sense. Since I'm a novice, how do I get this initialized?
      THanks, Bill.

      Comment


        #4
        Re: Posting error

        I'm having this same problem when trying to post between two databases in either A5v7 & A5v8 so I am forced to use A4v8 for these straight forward & I would imagine fairly common tasks.

        The posting process works fine & is easily set up in A4v8 but it is not exactly convenient to have to do this in an old DOS program and in a tiny window on my two screen XP.

        "using a variable that hasn't been initialized" - how was this issue resolved?

        How do you "initialize a variable"?

        There is only one thread about this problem on the Message Board - has nobody else had this same problem since March 2005?

        Hoping for a simple answer.

        Chris

        Comment


          #5
          Re: Posting error

          Chris, how about uploading a reduced scale copy of your database with instructions for us to follow to find the sequence that's misbehaving?

          Comment


            #6
            Re: Posting error

            Thanks Tom,

            I have just created two sample databases for you which I am, for example, trying to match by Company name to add the Exhibition Stand_No info from file E to file D.

            File D has two fields Company (Chr 52) & Stand_No (Chr 16) - there were names & contact details in the larger original of this file.

            File E has three fields Company (Chr 52), Exhibitors (Chr 20) & Stand_No (Chr 16) which shows which Stand at an exhibition in 2006 each Company used.

            I get the same not very helpful "Error running Post Operation - Variable post.m_exp1 expression - Field is not recognized", error message that Willie Sagulo spoke about when I try to post the contents of the <Stand_No> field in file E to the same field in file D using the <Company> name field as the common link.

            Regards,

            Chris

            Comment


              #7
              Re: Posting error

              Ok. I'll take a look. Can I use vers 8 of Alpha Five?

              Comment


                #8
                Re: Posting error

                Hi Tom,

                Sure - I can't get it to work in either A5v7 or A5v8 - only in A4v8.

                Thanks for you help.

                Best regards,

                Chris

                Comment


                  #9
                  Re: Posting error

                  Chris

                  I did the steps that you described and didn't get the error message.

                  I did learn that a posting operation will write to multiple target records..... I was sure that it won't...

                  You sent 2 tables, but didn't send the posting operation that you had defined. You'll need to send the other files that go along with the dbfs that you sent. .ddd,.ddm,.ddx

                  Here is the code from the operation I used. Does this work for you??

                  Code:
                  a_tbl = table.open("d")
                  ON ERROR GOTO ERROR19062007185138461
                  
                  
                  post.t_db = "e"
                  post.m_key = "Company"
                  post.t_key = "Company"
                  post.m_filter = ""
                  post.t_filter = ""
                  post.m_count = 1
                  post.m_field1 = "Stand_No"
                  post.m_exp1 = "@E->Stand_No"
                  post.t_count = 0
                  
                  'Prompt for confirmation before running the Operation.......
                  dim rec_count as n
                  rec_count = a5_get_records_in_query("e",post.t_filter)
                  message_text = "A maximum of "+rec_count + " record(s) will be Posted from 'e' to 'd'."+crlf(2)+ "OK to proceed?"
                  operation_result=ui_msg_box("Post Operation",message_text,UI_OK_CANCEL+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
                  If operation_result <> ui_ok_selected then
                  	end
                  end if
                  
                  
                  
                  a_tbl.post()
                  
                  
                  GOTO CONTINUE19062007185138461
                  ERROR19062007185138461:
                  ON ERROR GOTO 0
                  ui_msg_box("Error","Error running Post Operation"+crlf()+error_text_get())
                  END
                  CONTINUE19062007185138461:
                  a_tbl.close()
                  'Display a dialog box showing the results of the Operation
                  a5_post_op_result(a_records_processed,a_records_total,a_records_violated,"d")
                  'If the Operation is run from within a Form or Browse, then refresh the window
                  if is_object(topparent.this) then
                  	if topparent.Class() = "form" .or. topparent.class() = "browse" then
                  		topparent.Refresh_layout()
                  	end if
                  end if
                  Last edited by Al Buchholz; 06-19-2007, 07:54 PM.
                  Al Buchholz
                  Bookwood Systems, LTD
                  Weekly QReportBuilder Webinars Thursday 1 pm CST

                  Occam's Razor - KISS
                  Normalize till it hurts - De-normalize till it works.
                  Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                  When we triage a problem it is much easier to read sample systems than to read a mind.
                  "Make it as simple as possible, but not simpler."
                  Albert Einstein

                  http://www.iadn.com/images/media/iadn_member.png

                  Comment


                    #10
                    Re: Posting error

                    Chris,

                    A post operation takes the current record in a "transaction" table (your table "E") and then adds, subtracts or replaces a field value in a corresponding record in the "master" table. (Your table "D"). Presumably you're trying to "replace" the Stand_no field value, right?

                    Here, your "Master" table has multiple records with the same Company name. There is no single record in the "master" table which corresponds to each "transaction" table record. You cannot use a post operation except when there's a one to one link between the transaction record and the target record in the Master table. [ But, see Al's contrary findings, above. ]

                    Given your data a better plan would be to define an update operation. I've done this for you using a new set which I created. In this new set table "D" is primary, and table "E" is linked to it on the Company field, using a one to one link. The saved update operation simply copies the Stand_no field from table "E" to "D" in the context of this new set. This seems to meet your requirements unless I'm missing something.

                    Holler if you have questions.

                    -- tom
                    Last edited by Tom Cone Jr; 06-19-2007, 08:27 PM.

                    Comment


                      #11
                      Re: Posting error

                      Al,

                      I did learn that a posting operation will write to multiple target records..... I was sure that it won't...
                      Oops! I didn't even try to build a post op because I, too, didn't think this was an acceptable way to update multiple master table records. I'm surprised at the results you got.

                      Comment


                        #12
                        Re: Posting error

                        Thanks Al & Tom,

                        In order to answer Al's question, while I was writing down the method I am using the "post" it actually did post successfully between these 2 sample files (and matched one to many) but still will not work on the original files even with several attempts.

                        Wilie did say in his original message about this problem "It happens inconsistently."

                        This is the simple method I am trying to use with the Post Genie.

                        Master table is D -> Tools -> Create Operation -> Post Records -> Create using Genie -> Transaction table is E

                        Post Genie - Determining a Matching Record
                        Master table: Company
                        Transaction table: Company

                        Post Genie - Posting Rules

                        Rule 1 Update the value in: Stand_no (Master table)
                        by: Adding to it
                        the value in: Stand_no (Transaction table)
                        Post the value: Always

                        -> next> All records -> Run -> Finish -> OK to proceed (A maximum of 106 records will be posted from 'e' to 'd' -> OK

                        With the sample files it now works but with the original files which have more fields it produces the same error message as before.

                        Now - in answer to Tom's approach I have created a set as you suggested between the two original files & indeed it does work in that I can see which companies used which stands at the exhibition.

                        However, when the post worked between the two sample files it has actually matched "one to many" so this shows that it can do a one to many post.

                        The original questions remain - why will it post between two files sometimes, but not always & why won't it post between the original two files anytime?

                        Chris

                        Comment


                          #13
                          Re: Posting error

                          chris,

                          Posting by "adding to it" assumes you're adding a numeric field value to an existing numeric field value. Here your field is character type, right? Your only option is posting by "replacing". Suggest you try that and let us know how it goes. -- tom

                          Comment


                            #14
                            Re: Posting error

                            Doesn't work for either adding to or replacing.

                            Comment


                              #15
                              Re: Posting error

                              Ok, time to upload the entire database (not just dbf files), with instructions for us to follow in order to see the problem occur. We don't need actual data, but we do need a representative sampling.

                              Comment

                              Working...
                              X