Paradox Community

Items in pnews.paradox-web

Subject:Re: Hopefully the last help request
Date:Fri, 12 Aug 2016 14:00:14 -0400
From:Jim Moseley <jim@mapson.triptracker.com>
Newsgroups:pnews.paradox-web
Joe,

Have you looked at the text string of what is actually being sent back 
to your program from the web page's FORM?  This will direct you to where 
you issue is, and is easy enough to do in ObjectPal:
(Note - all this is off the top of my head, so ...)

myString = REQUEST.Content
myString.view() ; or ...
msgInfo("Returned:",myString)

You could also parse every REQUEST field using:
arKey.empty()
arVal.empty()
maxI = REQUEST.nFields - 1  ; does it need the minus 1?
for i from 0 to maxI
	arKey.addLast(REQUEST.getFieldName(i))
	arVal.addLast(REQUEST.getFieldByIndex(i))
endFor
arKey.view("Keys")
arVal.view("Values") ; or show how you want.

HTH,
Jim Moseley

On 8/12/2016 10:02 AM, JI wrote:
> Liz,
>
> If I may clarify.  I loop through the table and locate a checked box.
> The problem is that I can't retrieve the 3 field values on that line
> with a request.getfield().
>
> Joe
>
>
>
>
> On 8/11/16 6:43 PM, Liz McGuire wrote:
>> I don't quite understand the issue, but FYI, if the box is NOT checked,
>> it is not included in the request object.  So if it fails to get the
>> field, you should loop rather than return an error.
>>
>> Liz
>>
>>
>> On 11 Aug 2016 15:36, JI wrote:
>>>
>>> I've generated a table from the database.  One of the fields is a
>>> checkbox named 'Delete'.  The following code finds the line in which the
>>> box is checked but I can't get the values of the fields on the line so I
>>> can delete the record.
>>>
>>>
>>>     case upper(thebuttonpressed) = "DELETE APPOINTMENT" :
>>>         jij_lib.getTheUser()
>>>
>>>         tcEvents.open(":REPCHKDATA:Events.db")
>>>>     case upper(thebuttonpressed) = "DELETE APPOINTMENT" :
>>>>         jij_lib.getTheUser()
>>>>
>>>>         tcEvents.open(":REPCHKDATA:Events.db")
>>>>
>>>>         for I from 1 to thecount
>>>>             thecheckbox= "c" + string(I)
>>>>
>>>>             try
>>>>                 theCurrentCheckBox = Request.GetField(thecheckbox)
>>>>             onFail
>>>>              Response.resultstring = jij_lib.createAMessage( "\"Cannot
>>>> get the checkbox ID. \"")
>>>>              return
>>>>             endtry
>>>>
>>>>             if theCurrentCheckBox = "Delete" then
>>>>                 tcEvents.edit()
>>>>                 theFacilityName = request.getfield("Facility")
>>>>                 theProviderName = request.getfield("Provider")
>>>>                 theAppointmentDate = request.getfield("Date")
>>>>
>>>>                 try
>>>>                     tcEvents.locate(
>>>>                          "ProviderName",theProviderName,
>>>>                          "Name",theUser,
>>>>                          "FacilityName",theFacilityName,
>>>>                          "Event_Next",theAppointmentDate)
>>>>                     tcEvents.deleterecord()
>>>>                 onfail
>>>>                     Response.resultstring = jij_lib.createAMessage(
>>>> "\"Cannot find this record. \"")
>>>>                     return
>>>>                 endtry
>>>>
>>>>             endif
>>>>         endfor
>>>>         tcEvents.close()
>>>>         Response.resultstring = jij_lib.createAMessage( "\"You Deleted
>>>> a record! Press the REFRESH key. \"")
>>>>         return
>>>
>>>         for I from 1 to thecount
>>>             thecheckbox= "c" + string(I)
>>>
>>>             try
>>>                 theCurrentCheckBox = Request.GetField(thecheckbox)
>>>             onFail
>>>              Response.resultstring = jij_lib.createAMessage( "\"Cannot
>>> get the checkbox ID. \"")
>>>              return
>>>             endtry
>>>
>>>             if theCurrentCheckBox = "Delete" then
>>>                 tcEvents.edit()
>>>                 theFacilityName = request.getfield("Facility")
>>>                 theProviderName = request.getfield("Provider")
>>>                 theAppointmentDate = request.getfield("Date")
>>>
>>>                 try
>>>                     tcEvents.locate(
>>>                          "ProviderName",theProviderName,
>>>                          "Name",theUser,
>>>                          "FacilityName",theFacilityName,
>>>                          "Event_Next",theAppointmentDate)
>>>                     tcEvents.deleterecord()
>>>                 onfail
>>>                     Response.resultstring = jij_lib.createAMessage(
>>> "\"Cannot find this record. \"")
>>>                     return
>>>                 endtry
>>>
>>>             endif
>>>         endfor
>>>         tcEvents.close()
>>>         Response.resultstring = jij_lib.createAMessage( "\"You Deleted a
>>> record! Press the REFRESH key. \"")
>>>         return
>


Copyright © 2004 thedbcommunity.com