Paradox Community

Items in pnews.paradox-web

Subject:Re: Hopefully the last help request
Date:Fri, 12 Aug 2016 11:23:05 -0600
From:Liz McGuire <liz@paradoxcommunity.com>
Newsgroups:pnews.paradox-web
Just like the checkboxes are named C[some number], the other fields need 
to also have a unique name like Facility[some number] (Facility1, 
Facility2, Facility3, etc.).

Liz


On 12 Aug 2016 08:02, 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