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

Proper Web Filter ?

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

    Proper Web Filter ?

    I have an append page that needs to take certain data from one table and copies it to another. I used the desktop operations to create it, and copied the xbasic from the operation and took out the extra bits that did not need to be there.

    My single problem with it is:
    append.t_filter = "Location = \"Sold\""
    (filtered by field name "Location" and field value "Sold")

    This code causes a missing file error.
    Code:
    500 Internal Server Error
    "Script Error
    Error:Script: /scc/appendsold.a5w line:34
    a_tbl.append()
    The system cannot find the file specified.
    C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\27\VIOLATED.MDX"
    Whenever i take the filer out, and use
    append.t_filter = ""
    The action works perfectly, it copies the entire table over to the new table and does not cause an error.

    Any suggestions?
    Thanks!

    James A.

    #2
    Re: Proper Web Filter ?

    Code:
    append.t_filter = "Location = '" + Sold + "'"
    -Steve
    sigpic

    Comment


      #3
      Re: Proper Web Filter ?

      Thanks Steve for the response. I feel that I am closer to fixing this problem.

      I tried out what you suggested
      append.t_filter = "Location = '" + Sold + "'"

      but received the following error,

      500 Internal Server Error
      "Script Error
      Error:Script: /scc/appendsold.a5w line:14
      append.t_filter = "Location = '" + Sold + " '"
      Variable "Sold" not found."

      Even though there are multiple within the table with their location set on "Sold".

      Im going to play around with this, see what I come up with, now that it does seem to be searching the form.
      Thanks!

      James A.

      Comment


        #4
        Re: Proper Web Filter ?

        I didn't look closely enough at your needs the first time. Try this:

        Code:
        "Location = 'Sold'"
        trimming is also important:

        Code:
        "alltrim(Location) = 'Sold'"
        -Steve
        sigpic

        Comment


          #5
          Re: Proper Web Filter ?

          Thanks Steve for the response. I tried that out and received my original error.

          Code:
          500 Internal Server Error
          "Script Error
          Error:Script: /scc/appendsold.a5w line:34
          a_tbl.append()
          The system cannot find the file specified.
          C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\27\VIOLATED.MDX"
          I have been wondering about this error for some time now. Ever since I moved everything to my VPS I have had this error when I go to append.

          Before I had it hosted on a computer on our network. That computer also had a demo copy of alpha5 on it also though. I wonder if that was the reason it worked on the network pc and not our VPS.

          I have looked into this error as much as I knew how. This is my findings on the error on my VPS

          Perhaps there is something on my VPS conflicting with this section of coding.

          Thank you Steve for your suggestions, they have been much appreciated.
          Thanks!

          James A.

          Comment


            #6
            Re: Proper Web Filter ?

            I dunno. I haven't done an append on a web app yet, and wish I had time to set one up to try. Maybe soon.

            Sorry for the previous confusion today. I was 3/4 asleep when I did my first response. What you've been doing should work.
            -Steve
            sigpic

            Comment


              #7
              Re: Proper Web Filter ?

              Originally posted by Steve Workings View Post
              I dunno. I haven't done an append on a web app yet, and wish I had time to set one up to try. Maybe soon.

              Sorry for the previous confusion today. I was 3/4 asleep when I did my first response. What you've been doing should work.
              That's fine man, I appreciate you trying to help me with this issue.

              Yeah we shall see, as far as I can tell my coding is sound except for the filter.

              There is nothing else on the page except for 3 lines of plain text. No other scripts or coding. I even took off the timed relay to focus on this problem.
              Thanks!

              James A.

              Comment


                #8
                Re: Proper Web Filter ?

                Just put together a test that shows everything works as we would expect, and the filter functions properly.

                You can view and see the results here:

                http://test.workings.com/AppendTest_Sold.a5w

                The transaction table has 4 records. Prop2 and Prop3 are "Sold" while Prop1 and Prop4 are not.

                the append code is this:

                Code:
                a_tbl = table.open("[pathalias.adb_path]\append_test_sold.dbf")
                append.t_db = "[pathalias.adb_path]\append_test_unsold.dbf"
                append.m_key = ""
                append.t_key = ""
                append.m_filter = ""
                append.t_filter = "alltrim(Location) = \"Sold\""
                append.type = "All"
                append.m_count = 2
                append.m_field1 = "NAME"
                append.m_exp1 = "@APPEND_TEST_UNSOLD->NAME"
                append.m_field2 = "LOCATION"
                append.m_exp2 = "@APPEND_TEST_UNSOLD->LOCATION"
                append.t_count = 0
                a_tbl.append()
                Each time you click the append button, Prop2 and Prop3 will again be appended to the master table.
                -Steve
                sigpic

                Comment


                  #9
                  Re: Proper Web Filter ?

                  Hi Steve,

                  Your a lifesaver. I tried this on my main append function, and still received the error. I knew this was not sounding right, so I created a set of demo items, and recreated the append. Works fine on the vps.

                  did not work:
                  Code:
                  DIM Append as P
                  
                  a_tbl = table.open("[pathalias.adb_path]\sold")
                  append.t_db = "[pathalias.adb_path]\inventory"
                  
                  
                  
                  append.m_key = ""
                  append.t_key = "recno()"
                  append.m_filter = ""
                  append.t_filter = "alltrim(Location)=\"Sold\""
                  append.type = "All"
                  append.m_count = 8
                  append.m_field1 = "Id"
                  append.m_exp1 = "@Inventory->Id"
                  append.m_field2 = "Serial_Number"
                  append.m_exp2 = "@Inventory->Serial_Number"
                  append.m_field3 = "Stock_Code"
                  append.m_exp3 = "@Inventory->Stock_Code"
                  append.m_field4 = "Description"
                  append.m_exp4 = "@Inventory->Description"
                  append.m_field5 = "Condition"
                  append.m_exp5 = "@Inventory->Condition"
                  append.m_field6 = "Location"
                  append.m_exp6 = "@Inventory->Location"
                  append.m_field7 = "Notes"
                  append.m_exp7 = "@Inventory->Notes"
                  append.m_field8 = "Accessories"
                  append.m_exp8 = "@Inventory->Accessories"
                  append.t_count = 0
                  
                  a_tbl.append()
                  did work:
                  Code:
                  DIM Append as P
                  
                  a_tbl = table.open("[pathalias.adb_path]\append_sold")
                  append.t_db = "[pathalias.adb_path]\append_unsold"
                  
                  
                  
                  append.m_key = ""
                  append.t_key = "recno()"
                  append.m_filter = ""
                  append.t_filter = "alltrim(Location) = \"Sold\""
                  append.type = "All"
                  append.m_count = 2
                  append.m_field1 = "Name"
                  append.m_exp1 = "@Append_Unsold->Name"
                  append.m_field2 = "Location"
                  append.m_exp2 = "@Append_Unsold->Location"
                  append.t_count = 0
                  
                  a_tbl.append()
                  I must have an error somewhere. I have rewritten the coding on different a5w pages, and still same error. Perhaps something with my tables itself is an error. I wonder if I recreated the tables and such if it would work out correctly.

                  I will try this, thank you for clarifying that the coding works. The demo I made worked fine.

                  Thanks Steve
                  Thanks!

                  James A.

                  Comment


                    #10
                    Re: Proper Web Filter ?

                    I find it highly amazing how I can create two new tables (sccinventory and sccsoldinventory) with similar columns to the original, new data, along with new grids, and new a5w pages, and still receive the same error.

                    Perhaps it has to do with the amount of column information being pulled out? My demo with only two columns works fine on my VPS and my localhost. The new table with similar columns does not work on localhost either.


                    Code:
                    DIM Append as P
                    
                    a_tbl = table.open("[pathalias.adb_path]\sccsoldinventory.dbf")
                    append.t_db = "[pathalias.adb_path]\sccinventory.dbf"
                    
                    
                    
                    append.m_key = ""
                    append.t_key = ""
                    append.m_filter = ""
                    append.t_filter = "alltrim(Location) = \"Sold\""
                    append.type = "All"
                    append.m_count = 8
                    append.m_field1 = "Id"
                    append.m_exp1 = "@Sccinventory->Id"
                    append.m_field2 = "Serial_Number"
                    append.m_exp2 = "@Sccinventory->Serial_Number"
                    append.m_field3 = "Stock_Code"
                    append.m_exp3 = "@Sccinventory->Stock_Code"
                    append.m_field4 = "Description"
                    append.m_exp4 = "@Sccinventory->Description"
                    append.m_field5 = "Condition"
                    append.m_exp5 = "@Sccinventory->Condition"
                    append.m_field6 = "Location"
                    append.m_exp6 = "@Sccinventory->Location"
                    append.m_field7 = "Notes"
                    append.m_exp7 = "@Sccinventory->Notes"
                    append.m_field8 = "Accessories"
                    append.m_exp8 = "@Sccinventory->Accessories"
                    append.t_count = 0
                    
                    a_tbl.append()
                    My next step will be to make another demo with multiple random columns of data, and see if it will actually append.
                    Thanks!

                    James A.

                    Comment


                      #11
                      Re: Proper Web Filter ?

                      When I'm in a position such as yours, I'll start splitting off columns of the append.

                      Start at the 50% mark - take the last 1/2 off.

                      If it fails, cut another 50%.

                      If it succeeds, put back 1/2 of what you last cut. Etc.

                      Learned this technique while finding leaks in long runs of newly-laid underground pipe.

                      Hadda dig holes up to 20' or 30' deep to isolate the pipe sections. This is easier.
                      -Steve
                      sigpic

                      Comment


                        #12
                        Re: Proper Web Filter ?

                        Yes Steve, this is what I am going to focus on. Thanks for the great advice.
                        Thanks!

                        James A.

                        Comment


                          #13
                          Re: Proper Web Filter ?

                          I have been playing around with different things.

                          VPS:
                          Giving same error.

                          Localhost:
                          If I take off my [pathalias.adb_path]\ it works and does what its suppose to do. If I have the pathalias it gives same error as above.
                          Thanks!

                          James A.

                          Comment


                            #14
                            Re: Proper Web Filter ?

                            Hi James,

                            Were you ever able to determine how to fix this error in your .a5w page? I have encountered the same thing- with no filter on the transaction table, the append works fine, but with the filter, I get the following error:
                            Code:
                            The system cannot find the file specified. C:\DOCUME~1\u-alpha5\LOCALS~1\Temp\VIOLATED.MDX
                            My filter does not even have any quotes in it, it simply tries to check the length of the fields.

                            Code:
                            append.t_filter = "len(lt(Explanation))>0.and.len(lt(dtos(Resolved_Date)))>0.and.len(lt(Resolved_By))>0"
                            Any insight would be most appreciated.

                            Thanks

                            Comment


                              #15
                              Re: Proper Web Filter ?

                              Hi Marvin,

                              Actually I ended up deleting the two tables and recreating them (was at the beginning of a project with no real data inputted).

                              It worked after I recreated with a slight name change. Possibly check the indexing and your structures to see if they are the same for the fields being copied.


                              I actually have it setup now that it appends, changes a field (Location) in the data to APPENDED, then deleted the data based upon that field from the original table.

                              Code:
                              DIM Append as P
                              
                              a_tbl = table.open("[pathalias.adb_path]\scc_inventory_sold")
                              append.t_db = "[pathalias.adb_path]\scc_inventory"
                              
                              
                              
                              append.m_key = ""
                              append.t_key = ""
                              append.m_filter = ""
                              append.t_filter = "alltrim(Sold) = \"Sold\""
                              append.type = "All"
                              append.m_count = 9
                              append.m_field1 = "Id"
                              append.m_exp1 = "@Scc_Inventory->Id"
                              append.m_field2 = "Serialnumber"
                              append.m_exp2 = "@Scc_Inventory->Serialnumber"
                              append.m_field3 = "Stockcode"
                              append.m_exp3 = "@Scc_Inventory->Stockcode"
                              append.m_field4 = "Location"
                              append.m_exp4 = "@Scc_Inventory->Location"
                              append.m_field5 = "Exactlocation"
                              append.m_exp5 = "@Scc_Inventory->Exactlocation"
                              append.m_field6 = "Description"
                              append.m_exp6 = "@Scc_Inventory->Description"
                              append.m_field7 = "Condition"
                              append.m_exp7 = "@Scc_Inventory->Condition"
                              append.m_field8 = "Notes"
                              append.m_exp8 = "@Scc_Inventory->Notes"
                              append.m_field9 = "Accessories"
                              append.m_exp9 = "@Scc_Inventory->Accessories"
                              append.t_count = 2
                              append.t_case1 = "APPENDED"
                              append.t_field1 = "@Scc_Inventory->Location"
                              append.t_exp1 = "\"Appended\""
                              append.t_case2 = "VIOLATED"
                              append.t_field2 = "@Scc_Inventory->Location"
                              append.t_exp2 = "\"Sold\""
                              a_tbl.append()
                              a_tbl.close()
                              
                              a_tbl = table.open("[pathalias.adb_path]\scc_inventory")
                              a_tbl.delete_range("alltrim(Location) = \"Appended\"")
                              a_tbl.close()

                              Hope this helps you a bit,

                              James
                              Thanks!

                              James A.

                              Comment

                              Working...
                              X