Login
`
Templates, Tools and Utilities
|
||
![]() |
![]() |
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Template modification to pass parameters - C5 1999-03-30 -- Ken Wagner A big tip of the hat (not dunce either) to Arnor, David, Russell, Steve, et.al.
The Update Form procedure overloading with amnesia in the calling browse may be
solved.
ABBrowse.TPW
At line #1903 change:
#PROMPT('&Update Procedure',PROCEDURE),%UpdateProcedure
to
#PROMPT('&Update Procedure',PROCEDURE),%UpdateProcedure
#PROMPT('Parameters:',@s255),%UpdateProcedureParameters !(Add this line)
At line #1931 change:
#IF(%UpdateProcedure)
#ADD(%ProcsCalled,%UpdateProcedure)
#IF(~%EditInPlace)
%ManagerName.AskProcedure = %(INSTANCE(%ProcsCalled))
#ENDIF
#ENDIF
to
#IF(%UpdateProcedure)
#IF (%UpdateProcedureParameters)
#ADD(%ProcsCalled,%UpdateProcedure&%UpdateProcedureParameters)
!New line for Parms with "&"
#ELSE
#ADD(%ProcsCalled,%UpdateProcedure) !If no parms passed by browse
#ENDIF
#IF(~%EditInPlace)
%ManagerName.AskProcedure = %(INSTANCE(%ProcsCalled))
#ENDIF
#ENDIF
Thanks Arnor, for the C4 template patch to use as a guide. As Arnor stated: "You now
have a parameter prompt below the update combodrop where you can specify the
parameters in the normal format"
e.g. (CustCode,StartDate,EndDate), remember to include the parentheses.
Amazin'. Works.
Does the code look right to you? Corrections & improvements welcome.
G'day, mates.
Today is April 2, 2025, 4:41 pm This article has been viewed 35263 times.
|
|