` Change Clarion templates to pass parameters to forms (Arnor Baldvinsson) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Templates: Change Clarion templates to pass parameters to forms
1999-03-08 -- Arnor Baldvinsson
 
Newsgroups: comp.lang.clarion Hi Femi, On Sun, 7 Mar 1999 23:15:41 +0100, "Simplex Systems" wrote: >I need to pass a value form a BrowseForm to an UpdateForm. How do I ? >There must be a better way than using global Values. There are other ways, but they involve either of two things: Template change or some code manipulation. The template change is easy. Open one file in the C4/template directory, the ctlbrowa.tpw. First locate a line starting with: #CONTROL(BrowseUpdateButtons In my template this is line 120. Next locate this line: #PROMPT('&Update Procedure',PROCEDURE),%UpdateProcedure this is line nr. 127 in my template. Add the following line right below it: #PROMPT('Parameters:',@s255),%UpdateProcedureParameters Next locate this line: %InstancePrefix:CallUpdate ROUTINE This is nr. 500 in my template after adding the line above. Few lines below you will find this code: CLOSE(%ListView) LOOP GlobalRequest = LocalRequest VCRRequest = VCRNone %UpdateProcedure LocalResponse = GlobalResponse Change it to: CLOSE(%ListView) LOOP GlobalRequest = LocalRequest VCRRequest = VCRNone #IF(%UpdateProcedureParameters) %UpdateProcedure %UpdateProcedureParameters #ELSE %UpdateProcedure #END LocalResponse = GlobalResponse This does it - you now have a parameter prompt on the update buttons properties (action tab) where you specify the parameters in the normal format: (Loc:MyField, Loc:MyOtherField) ie, with the surrounding paranthesis. Best regards, Arnor Baldvinsson


Today is November 21, 2024, 3:56 am
This article has been viewed 35205 times.
Google search has resulted in 39 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: