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

Guidance needed- copy record

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

    Guidance needed- copy record

    I'm frustrated and have tried a for a couple of weeks to get the following done. If someone has any suggestions how to do this, it would be greatly appreciated.

    Objective:
    To allow members to view each other's inventories and send offers to trade. I have attempted two different ways to no avail.

    (1) A user views an inventory of items and after they select to view the details of a specific item they can click a link/button that will send the owner of that item a filtered link of their inventory. The owner can then click that link and go to that inventory, without needing to log in until they decide to act on it. I am able to get an email sent but it does not accept any filter expression. (there are a couple of threads on this in the forum).

    (2) A user views an inventory of items and after they select to view the details of a specific item they can click a link/button that places that item in a different database table (call it OFFER) and it sends a general text email to the owner who can then click it to see what it is. They will need to log in so it will filter only offers to them. I thought of this when I couldn't figure out the filter email. This one I have not gotten too far with and there is little I can find to guide me in regards to web pages.

    I have received ideas from past post, that I have truly appreciated, but have still been unsuccessful. Am I going about it wrong or making it too difficult or does anyone have any other thoughts as to making this work?

    Thanks in advance

    Ken

    #2
    Originally posted by vinyltap
    (1) A user views an inventory of items
    Ken,

    Are you basing this on application that are web based interface or network-PC applications?

    Mike W
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    Comment


      #3
      Web Based

      Sorry- these are Alpha5 databases and components only.

      Ken

      Comment


        #4
        Can't help

        Ken,

        Sorry I haven't ventured to the web application yet, so I can't help. Good luck..

        Mike w
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          hi ken

          let me make sure i have this right

          you would like to set up a trading site
          and this would involve swaps of things

          so Alex would list his inventory on your site A.inv
          in the INV table
          and Sue would list her inventory on our site S.inv
          in the INV table

          now when one of your users see something that he/she
          would like to have he/she would notify the owner of the
          coveted item that there is interest in a trade and present to that
          owner a list of things that the swappee would like to trade

          am i anywhere close???

          if i am then i would use 2 tables for the offer

          then if Alex liked an item S.inv.thing1 he must
          move to the offer table a list of those things he is willing to trade
          this list must be filtered because he has the Hope Diamond in his
          list and only wants a to obtain Sue's 15 year old 10 speed.

          i think i would structure the offer so that the following
          information is available to Sue when she sees what is offered

          1) Alex member id
          2) Sue member id
          3) Sue Inv Item number

          and of course the things that alex would want to trade

          i think that i would use 2 tables
          1) offerhead
          this tables should have the following
          1) a unique offer id (an auto increment number field)
          2) Alex member id
          3) Sue member id
          4) Sue Inv Item number
          and possibly
          5) a counteroffer field id (in case you want to use counter offers)
          2)offerlist
          this table would hold the info for each item in the list
          and a selector field to choose items in the list ?????

          then when Alex creates his offer then i would send an email
          to Sue that contains a link to the page that has
          2 components on it 1)the header and 2)the list of the item offered
          the filter for the list would be the unique offer id from the offerhead table
          HTML Code:
          <A name="trademe" href = "http://myserver.com/mypage.a5w?mygridlinker_filter=myofferid=XXX"><Lets Trade>


          i am not sure how you go about adding the filtered list of items to the
          email message i must defer to someone much more knowledgable about
          sending emails
          but it seems to me that it would be much simpler to just use a link to the offer page in the email

          thats my 2 cents worth - hope i havent muddied the waters too much

          regards
          martin
          regards

          martin
          www.jollygreenthumb.com

          Comment


            #6
            To simplify/expand on thought

            To simplify my trade will always be one for one as all the items will be of the same type. I have the table for items available that can be filtered by user.

            Using your example;

            Alex would see something he likes, click a link and on that click take that item and put into a Swap table. Then fire an email back to Sue with a link to a page with a component that shows that offer (she will have to log in to see it).

            I can't seem to figure out how to get that item plunked into the new table.

            Thanks for help so far.

            Ken

            Comment


              #7
              Ken

              here are some links to the help files

              linksyntax i meant to send this with my last reply

              http://support.alphasoftware.com/alp...der_Syntax.htm

              there are 3 functions that you might use for this
              tbl.copy_record_to, tbl.copy_records_to and tbl.record_clone
              the links below are to the help files again and they have EXAMPLES to help you

              http://support.alphasoftware.com/alp...ECORD_TO().htm
              http://support.alphasoftware.com/alp...CORDS_TO().htm
              http://support.alphasoftware.com/alp...RD_CLONE().htm

              as you can see the fields in each table must have the same names and must be defined as the same type and size

              i think that the tables must be mirror images of each other for the clone method to work properly

              of course you can do this by code also without those restrictions
              and also note that if you have an autoincrement number field this may be a problem also

              here is how i used the clone function
              Code:
                        ' Move the completed order from the temp files to the main files
                        ' the orderhead is an autoincrement file so we must save it and then find it with the torder number
                        ' to retrieve the ordernumber
                        on error goto failed_to_copy
                                            ' the header file
                        				tbl2 = table.open("[PathAlias.ADB_Path]\TordHead",FILE_RW_SHARED)                                                                   				
                        				t2index = tbl2.index_primary_put("Order_Id")
                                            tbl2.fetch_find(MyOrderNum)
                                            tbl2.change_begin()
                                            tbl2.Tord_Id = MyOrderNum
                                            tbl2.change_end(.T.)                                                           
                                            result = tbl2.copy_record_to("[PathAlias.ADB_Path]\OrdHead")
                                            t2index.close()
              		                    tbl2.close()
              		                    ' now find the new ORDER NUM and use this for the dependent records
              		                    tbl3 = table.open("[PathAlias.ADB_Path]\OrdHead",FILE_RW_SHARED)
              		                    t3index = tbl3.index_primary_put("Torder_Id")
              		                    tbl3.fetch_find(MyOrderNum)
              		                    MyNewOrdNum = tbl3.Order_id		                    
              		                    tbl3.close()
                                                                          
                                            ' the  "CC" payment file                              
                            				tbl2 = table.open("[PathAlias.ADB_Path]\TordCC",FILE_RW_SHARED)
                        				t2index = tbl2.index_primary_put("Payment_Order_Id")
                                            tbl2.fetch_find(MyOrderNum)
                                            tbl3 = table.open("[PathAlias.ADB_Path]\OrdCC",FILE_RW_SHARED)
                                            'result = tbl2.copy_record_to("[PathAlias.ADB_Path]\OrdCC.dbf")
                                                 tbl3.enter_begin()
                                                 tbl3.record_clone(tbl2)
                                                 tbl3.Payment_Order_Id = MyNewOrdNum
                                                 tbl3.enter_end(.T.)
                                            tbl3.close()     
                                            t2index.close()
              		                    tbl2.close()
                                                                  
                                            'the following tables have multiple records to copy
                                            ' the condition file'
                            				tbl2 = table.open("[PathAlias.ADB_Path]\TordCond",FILE_RW_SHARED)
                        				t2index = tbl2.index_primary_put("Cond_Id")
                                            tbl2.fetch_find(MyOrderNum)
                                            tbl3 = table.open("[PathAlias.ADB_Path]\OrdCond",FILE_RW_SHARED)
                                            'result = tbl2.copy_records_to("[PathAlias.ADB_Path]\OrdCond","Cond_Id =" + S_QUOTE(MyOrderNum))
                                            while .NOT. tbl2.fetch_EOF()
                                                 if tbl2.cond_id = MyOrderNum then
                                                       tbl3.enter_begin()
                                                       tbl3.record_clone(tbl2)
                                                       tbl3.Cond_Id = MyNewOrdNum
                                                       tbl3.enter_end(.T.)
                                                 end if     
                                                 tbl2.fetch_next()
                                            end while
                                            tbl3.close()                 
                                            t2index.close()
              		                    tbl2.close()
                            				tbl2 = table.open("[PathAlias.ADB_Path]\TordBody",FILE_RW_SHARED)
                        				t2index = tbl2.index_primary_put("Body_Id")
                                            tbl2.fetch_find(MyOrderNum)
                                            tbl3 = table.open("[PathAlias.ADB_Path]\OrdBody",FILE_RW_SHARED)                              
                                            'result = tbl2.copy_records_to("[PathAlias.ADB_Path]\OrdBody","Body_Id =" + S_QUOTE(MyOrderNum))
                                             while .NOT. tbl2.fetch_EOF()
                                                 if tbl2.Body_Id = MyOrderNum then    
                                                      tbl3.enter_begin()
                                                      tbl3.record_clone(tbl2)
                                                      tbl3.Body_Id = MyNewOrdNum
                                                      tbl3.enter_end(.T.)
                                                 end if
                                                 tbl2.fetch_next()
                                            end while
                                            tbl3.close()                             
                                            t2index.close()
              		                    tbl2.close()
                            on error goto 0
              hth
              regards
              martin
              regards

              martin
              www.jollygreenthumb.com

              Comment


                #8
                Grab the record

                I saw those links in my research.

                How do I tell it to get the record being viewed/click. Their example was in putting the specific record # in but in this case it will change depending on what is being clicked? There wasn't anything explaining how to put a variable in there.

                Ken

                Comment


                  #9
                  hi ken
                  you have i assume a a5w page with a grid in it
                  that has alexes inventory displayed
                  and i assume that you have one of the fields set up as a link
                  if thats the case then the link should read something like

                  'mycodepagename.a5w'

                  this should be an a5 page that you can write in any text editor
                  but do not use the wyswyg editor

                  basically you must read the values sent form the previous page
                  and then use them to do what you want

                  copy the following code into a text file and save it to
                  maybe 'mycodepagename.a5w'

                  Code:
                  <%a5
                  
                  		'this code will allow me to see what the refering page has sent to this page ,comment it out to make the page work
                  			? "TEST RETURN     Alex's Inventory" 
                  			? request.raw
                  			end 
                  %>
                  remember to publish it

                  when you run you origianl page and click the link it sould take you to
                  mycodepagename.a5w and it sould display the raw data sent from the sending page

                  so now you should be able to see what the sending page has sent
                  to mycodepagename.a5w

                  let me know if you have it working ok
                  when you do take a look at this

                  Code:
                  <%a5
                  
                  		'this code will allow me to see what the refering page has sent to this page ,comment it out to make the page work
                  			'? "TEST RETURN     Addon1" 
                  			'? request.raw
                  			'end 
                  
                  
                  
                  
                  
                  dim MyProd as N
                  dim MyQty as N
                  dim MyProd2 as N
                  dim MyTUser as N
                  dim MyOrderNum as N
                  dim MyLineNum as N
                  dim tbl as p
                  
                  dim tbl2 as P
                  dim t2index as P
                  
                  
                  dim MyBigString as C
                  dim MyLittleString as C
                  dim MyEndString as C
                  dim MySecondString as C
                  dim MyCounter as N
                  dim MyCount as N
                  dim MyQCounter as N
                  dim MQCount as N
                  dim myrecord as N
                  
                  	MyLittleString = "MyID="
                  	MyEndString = "&"
                  	MySecondString = "MyQTY="
                  	MyCounter = 1
                  	MyOrderNum = convert_type(session.torder,"N")
                  
                  'make sure that the user has chosen something and not just pressed the wrong button
                  ' get the product id sent from the calling form
                  	if eval_valid("request.variables.MyID") = .t. then
                  		'how many items chosen
                  		
                  						'? " In Eval_valid = TRUE" +"<br>"
                  						'? request.variables.MyID +"<br>"	
                  						'? request.Body 
                  						' end
                  		MyBigString = request.body
                  		MyCount = occurs(MyLittleString,MyBigString)
                  
                  		if mycount > 0 then
                  
                  		' get the total item onpage with the Myqty  field
                  		MyQCount =occurs(MySecondString,MyBigString)
                  		
                  		'Got at Least on Item chosen so we need to open the  body file, find the right line # and add the item(s)
                  		' remember we saved the TOrder to a session variable so we will use it to get the correct order and line number
                  		'MyLineNum = LookupN("L",session.torder,"Body_Linenum","[PathAlias.ADB_Path]\TOrdBody","Body_Id")		
                  		tbl = table.open("[PathAlias.ADB_Path]\TOrdbody",FILE_RW_SHARED)
                  				tbl2 = table.open("[PathAlias.ADB_Path]\Products",FILE_RW_SHARED)
                  				t2index = tbl2.index_primary_put("Productid")
                  				
                  '? "insidemy qqty > 0 "  + myqcounter +"<br>"			
                  			'Get the Item #
                  		while MyQCounter <= MyQCount 
                  			MyQty =  convert_type(extract_string(MyBigString,MySecondString,MyEndString,myqcounter,.F.,.F.,.F.),"N")
                  			if MyQty > 0 then
                  				tbl.enter_begin()
                  					MyProd = convert_type(extract_string(MyBigString,MyLittleString,MyEndString,mycounter,.F.,.F.,.F.),"N")				
                  						MyLineNum = 10 ' addon identifier						
                  						tbl.Body_LineNum = MyLineNum 
                  						tbl.Body_Id = session.torder			
                  						tbl.Body_Item = MyProd
                  						tbl.Body_Qty = MyQty
                  						tbl.Body_tax = "Y"
                  						myrecord = tbl2.fetch_find(MyProd)
                  							tbl.Body_Desc = tbl2.Webname
                  							tbl.Body_price = tbl2.Currentprice							
                  							tbl.Body_Img = tbl2.Whiteimgsm
                  							tbl.Body_Code = tbl2.Itemnumber
                  							tbl.Body_Seasonal = tbl2.Seasonal
                  							tblH.Body_Leadtime = tbl2.Leadtime	
                  				tbl.enter_end(.t.)
                  				MyCounter = MyCounter + 1
                  			end if
                  			MyQCounter = MyQCounter + 1
                  		end while
                  		t2index.close()
                  		tbl2.close()		
                  		tbl.close()				
                                                   
                  		
                  		end if
                  'Add up all sales taxes for the line item and update the sales tax record
                  				dim mytab as P
                  				dim MyI as P
                  				dim MyRec as N
                  				dim myline as C
                  				dim Taxable as N
                  				dim Nontaxable as N
                  				dim MyRate as N
                  				dim myTax as N
                  				dim mySeasonal as C
                  				dim myLeadtime as N
                  				mySeasonal = ""
                  				myLeadtime = 0
                  				myTax = 0
                  				dim Head as P
                  				dim Headindex as P
                  
                  				MyRate = LookupN("F","JGT","Tax_Rate","[PathAlias.ADB_Path]\Tax","Tax_Code")
                  				mytab = table.open("[PathAlias.ADB_Path]\TordBody",FILE_RW_SHARED)
                  				myi = mytab.index_primary_put("Body_Id")
                  				MyRec = mytab.fetch_find(MyOrderNum)				
                  				if Myrec > 0 then
                  					mytab.fetch_goto(MyRec)
                  					while .NOT. mytab.fetch_eof()						
                  						if mytab.BODY_ID == MyOrderNum then
                  							if mytab.Body_Tax = "N" then				
                  								nontaxable = nontaxable + (mytab.Body_Price * mytab.Body_Qty)							
                  							end if											
                  							if mytab.Body_Tax = "Y" then				
                  								taxable = taxable + (mytab.Body_Price*mytab.Body_Qty)
                  							end if
                  							if mytab.Body_Seasonal <> "" then
                  								mySeasonal = mytab.Body_Seasonal
                  							end if
                  							if mytab.Body_Leadtime <> 0 then
                  								myLeadtime = mytab.Body_Leadtime
                  							end if
                  						end if
                  					mytab.fetch_next()		
                  					end while
                  				end if
                  				myi.close ()				   
                  				mytab.close()	
                  ' get the sales tax record and enter the amount
                  				mytab = table.open("[PathAlias.ADB_Path]\TordBody",FILE_RW_SHARED)
                  				myline = STR(MyOrderNum,19,5)+STR(95,19,5)		'		
                  				myi = mytab.index_primary_put("Orderandline")
                  				Myrec = mytab.fetch_find(myline)
                  
                  				if Myrec > 0 then
                  					mytab.fetch_goto(MyRec)					
                  					mytab.change_begin()
                  					mytab.Body_Price = Taxable * MyRate
                  					myTotal = Taxable + (Taxable * MyRate) + Nontaxable
                  					myTax = mytab.Body_Price					
                  					mytab.change_end(.t.)								
                  				end if	
                  				myi.close ()				   
                  				mytab.close()
                  
                  	'Save Order info to the Header File
                  	Head = table.open("[PathAlias.ADB_Path]\TordHead",FILE_RW_SHARED)
                  	Headindex = head.index_primary_put("Order_Id") 
                  	Myrec = Head.fetch_find(MyOrderNum)
                  	if Myrec > 0 then
                  		Head.fetch_goto(MyRec)					
                  		Head.change_begin()
                  		Head.total = myTotal
                  		if myTax > 0 then
                  			Head.Taxable = "Y"
                  			Head.Tax = myTax
                  		else
                  			Head.Taxable = "N"
                  			Head.Tax = 0
                  		end if
                  		Head.Seasonal = mySeasonal
                  		Head.Leadtime = myLeadtime						
                  		Head.change_end(.t.)								
                  	end if	
                  	Headindex.close ()				   
                  	Head.close()
                  		
                  		
                  		
                  	else
                  		'goto showcart.a5w		
                  		? "In Eval_Valid = FALSE"
                  		? request.raw
                  	' end -dont stop here goto show cart.a5w
                  	end if
                  
                  
                  ' ok now lets show the Cart page
                  ' remember the session variable is a char string and we need a numeric
                  MyOrderNum = convert_type(session.torder,"N")
                  		response.redirect("CartShow.a5w?TordBody_Filter=Body_ID=" + MyOrderNum)
                  
                  %>

                  this page gets the variables sent from the previous page and then
                  opens the inventory file finds the record for the users choices and then
                  creates records in the order line items table

                  all by code

                  it then redirects the user to the shopping cart page

                  you might use this technique but in your case i think that the copy record or clone record may do the trick

                  hth
                  regards
                  martin
                  regards

                  martin
                  www.jollygreenthumb.com

                  Comment


                    #10
                    Ran Test

                    I ran the test and it's pulling the right record when clicked upon, highlighted below:

                    TEST RETURN Test InventoryGET /test.a5w HTTP/1.1 Host: ykeep.com:81 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://ykeep.com/Swap_Items_All.a5w?...ll_DetailView=14&82052677 Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Cox High Speed Internet Customer; .NET CLR 1.1.4322) Connection: Keep-Alive Cookie: A5W_Sess_ID=79ae76bf1b0542a4a984cc17fbcd4baa; A5W_LoadBalance=YBS1|81|Fri, 19 May 2006 12:47:55 GMT

                    I started dabbling with copy_record_to but couldn't figure out how to get this item to get copied into the table I want it to go.

                    Ken

                    Comment


                      #11
                      hi ken

                      ok now we know that the proper page is called and we know
                      that the sending page was using the GET method
                      so lets make sure that the sending page gives the data a name

                      change your sending link to something like

                      'mycodepagename.a5w?mythingamabob={alexesinventorynumber or id}

                      the{....} above must be from the list of fields that is available in the
                      link address setup box in your component builder


                      and lets change the code in the mycodepagename.a5w file to


                      Code:
                      <%a5
                      
                      		'this code will allow me to see what the refering page has sent to this page ,comment it out to make the page work
                      			? "TEST RETURN     Addon1" 
                      			? request.raw
                      			? "<br>"
                      			if eval_valid("request.variables.mythingamabob") = .t. then
                      				? "myvariables   <br>"
                      				?  request.variables.mythingamabob + "<br>"
                      				? "end of variables   <br>"
                      			else
                      				? "there is no request variable mythingamabob  <br>"
                      			end if
                      			? "<br>"
                      			? "myheaders --- " + request.headers
                      			? "<br>"
                      			? "myquery --- " + request.Query_String
                      			end 
                      
                      
                      %>

                      you should take a look at the help file
                      http://support.alphasoftware.com/alp...t_Variable.htm
                      this will help you understand the differences between post and get and
                      the differences in what will be available and when

                      now that you have a variable and a value you can pick it up and use it in
                      your code

                      ok you should be off to the races now

                      best of luck
                      regards
                      martin
                      regards

                      martin
                      www.jollygreenthumb.com

                      Comment


                        #12
                        Syntax issue?

                        Thanks for your help Martin. I'm gettiing the error response, but I feel I may have used your code incorrectly. Let me know if you notice where I may have gone wrong.
                        Code:
                        <%a5
                        
                        			? "TEST RETURN     Addon1" 
                        			? request.raw
                        			? "<br>"
                        			if eval_valid("request.variable.Item_no") = .t. then
                        				? "myvariables   <br>"
                        				?  request.variable.Item_no + "<br>"
                        				? "end of variables   <br>"
                        			else
                        				? "there is no request variable Item_no  <br>"
                        			end if
                        			? "<br>"
                        			? "myheaders --- " + request.headers
                        			? "<br>"
                        			? "myquery --- " + request.Query_String
                        			end 
                        
                        
                        %>
                        Here is what I get when I run the above;

                        Code:
                        TEST RETURN Addon1GET /test2.a5w HTTP/1.1 Host: ykeep.com:81 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://ykeep.com/Swap_Items_All.a5w?Swap_Items_All_DetailView=1&111059564 Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Cox High Speed Internet Customer; .NET CLR 1.1.4322) Connection: Keep-Alive Cookie: A5W_Sess_ID=79ae76bf1b0542a4a984cc17fbcd4baa; A5W_LoadBalance=YBS1|81|Mon, 22 May 2006 15:46:06 GMT 
                        there is no request variable Item_no 
                        
                        myheaders --- GET /test2.a5w HTTP/1.1 Host: ykeep.com:81 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Referer: http://ykeep.com/Swap_Items_All.a5w?Swap_Items_All_DetailView=1&111059564 Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Cox High Speed Internet Customer; .NET CLR 1.1.4322) Connection: Keep-Alive Cookie: A5W_Sess_ID=79ae76bf1b0542a4a984cc17fbcd4baa; A5W_LoadBalance=YBS1|81|Mon, 22 May 2006 15:46:06 GMT
                        myquery ---
                        Thanks again.

                        Ken

                        Comment


                          #13
                          hi ken
                          sorry you are having trouble
                          a few questions

                          are you using a link to get this a5w page?
                          are you using the detail view link on your grid?
                          did you create a new field for this link?
                          does your link code look something like this

                          'mycodepagename.a5w?Item_no={alexesinventorynumber or id}

                          martin
                          regards

                          martin
                          www.jollygreenthumb.com

                          Comment


                            #14
                            Here are the details

                            Code:
                            are you using a link to get this a5w page?
                            Yes the link is:
                            Swap_Item_Detail.a5w?Swap Item View_filter=Item_no={Item_No}
                            Code:
                            are you using the detail view link on your grid?
                            Yes- but I am getting an error message with it recently that I didn't get before. Should be same above. Note I use the same link for a link field and it works fine.
                            The error I'm getting all of a sudden (the detail link was working fine) is:
                            Code:
                            500 Internal Server Error
                            Script Error
                            Error:Script: /Swap_Items_All.a5w line:29
                            x_Swap_Items_All = a5w_run_Component(tmpl_Swap_Items_All)
                            Property is write only 
                            tempP.expn subelement not found.

                            Comment


                              #15
                              Addition

                              As a note if I eliminate the Detail view and use the
                              Code:
                              Swap_Item_Detail.a5w?Swap Item View_filter=Item_no={Item_No}
                              link in both areas the error goes away, but then I can't differentiate from a person just viewing the item to a person wishing to make an offer on the item.

                              Ken

                              Comment

                              Working...
                              X