Error:
Error running Grid:
Error executing CanInsertRecord event handler: command: datasubmitted.casenum = PageVariables.currentclient Property not found
PageVariables.currentclient subelement not found.
URL
localhost/AgencySystem2Web/CLientDetailTabbedPage.a5w?currentclient=2
Xbasic code (see line in red)
function CanInsertRecord as v (DataSubmitted as P, Args as p, PageVariables as p, Result as p)
with PageVariables
Result.Cancel = .f.
Result.ErrorHTML = ""
debug(1)
Result.Cancel = .f.
Result.ErrorHTML = ""
if DataSubmitted.QtyRequested=0 .and. len(DataSubmitted.UnableToServe)=0 then
result.cancel = .t.
result.errorhtml = "Enter a non zero quantity provided or select the reason unable to serve"
end if
IF DATASUBMITTED.QTYREceived > DATASUBMITTED.MAXQTY then
result.cancel = .t.
result.errorhtml = "Quantity entered exceeds MAX for this service"
end if
datasubmitted.casenum = PageVariables.currentclient
if DataSubmitted.WhoToCount = "Family" .and. DataSubmitted.PersonServedName <> "**Family**" then
result.cancel = .t.
result.errorhtml = "Service is for family - Select **FAMILY** in Who served"
end if
if DataSubmitted.WhoToCount <> "Family" .and. DataSubmitted.PersonServedName = "**Family**" then
result.cancel = .t.
result.errorhtml = "Service is for an individual - Select the person in Who served"
end if
end with
end function
Reference this wiki reference on PageVariables
http://wiki.alphasoftware.com/Using%20Grid%20Events
also fails if I change the line to:
datasubmitted.casenum = currentclient
Error running Grid:
Error executing CanInsertRecord event handler: command: datasubmitted.casenum = PageVariables.currentclient Property not found
PageVariables.currentclient subelement not found.
URL
localhost/AgencySystem2Web/CLientDetailTabbedPage.a5w?currentclient=2
Xbasic code (see line in red)
function CanInsertRecord as v (DataSubmitted as P, Args as p, PageVariables as p, Result as p)
with PageVariables
Result.Cancel = .f.
Result.ErrorHTML = ""
debug(1)
Result.Cancel = .f.
Result.ErrorHTML = ""
if DataSubmitted.QtyRequested=0 .and. len(DataSubmitted.UnableToServe)=0 then
result.cancel = .t.
result.errorhtml = "Enter a non zero quantity provided or select the reason unable to serve"
end if
IF DATASUBMITTED.QTYREceived > DATASUBMITTED.MAXQTY then
result.cancel = .t.
result.errorhtml = "Quantity entered exceeds MAX for this service"
end if
datasubmitted.casenum = PageVariables.currentclient
if DataSubmitted.WhoToCount = "Family" .and. DataSubmitted.PersonServedName <> "**Family**" then
result.cancel = .t.
result.errorhtml = "Service is for family - Select **FAMILY** in Who served"
end if
if DataSubmitted.WhoToCount <> "Family" .and. DataSubmitted.PersonServedName = "**Family**" then
result.cancel = .t.
result.errorhtml = "Service is for an individual - Select the person in Who served"
end if
end with
end function
Reference this wiki reference on PageVariables
http://wiki.alphasoftware.com/Using%20Grid%20Events
also fails if I change the line to:
datasubmitted.casenum = currentclient
Comment