CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 When are perl vars "PK_" ...

Print topic Send  topic

Author Message
David A. Lee
Posted: 05/31/2001, 1:10 PM

In several custom action sections using Perl+Templates I need
access to the form parameters. (such as After Insert).
In one form I can use
$cid = GetParam("c_id");

but in another *almost identical* form that didnt work ! I had to use
$cid = GetParam("PK_c_id");

I discovered this only by looking at the generated code and a LOT of
expermenting.
I guess "PK_" must mean "primary key" ... but I dont understand why
the 2 cases were different. Both forms had the same field "c_id" marked
as a "key" .. both forms had that field as an input variable.
In the the first case the field was "Hidden" and in the second case it was
"URL" ...
but I dont understand why (or if) that triggers a name change of the form
variable.
Can anyone refrence me to the rules of what name to expect form variables
in different situations ? Its not at all obvious to me !!!
I'm also concerned that its a difficult maintance issue this way, if later I
go back
to the form and make a minor modification .. then my custom code can break,
and often it breaks very quietly ... all SQL errors are turned off ... it
just appears
to work but one or more custom statements dont do what they should ...
the errors only appear later as incorrect values in the database.




--------------------------------------------------
David A. Lee
Dal Enterprises Inc.
dave@calldei.com
http://www.calldei.com

Hellen
Posted: 06/01/2001, 2:43 AM

David,
let's try to clear it up. The most simple explanation is. All filed types
using in CodeCharge can be devided to updateable and unupdatable.
It's HTML feature. Updatale fields are: Hidden, Textbox, TextArea, ListBox.
Unupdatable are: Label and URL fields.
As for primary key field, if it set as updatable field you can get its value
both as
GetParam("PK_c_id") and GetParam("c_id")
If it set as Unupdatatble you get get its value only as
GetParam("PK_c_id").

Regards,
CC Support

"David A. Lee" <dave@calldei.com> wrote in message
news:9f68fk$tmj$1@mail.tankhill.com...
> In several custom action sections using Perl+Templates I need
> access to the form parameters. (such as After Insert).
> In one form I can use
> $cid = GetParam("c_id");
>
> but in another *almost identical* form that didnt work ! I had to use
> $cid = GetParam("PK_c_id");
>
> I discovered this only by looking at the generated code and a LOT of
> expermenting.
> I guess "PK_" must mean "primary key" ... but I dont understand why
> the 2 cases were different. Both forms had the same field "c_id" marked
> as a "key" .. both forms had that field as an input variable.
> In the the first case the field was "Hidden" and in the second case it was
> "URL" ...
> but I dont understand why (or if) that triggers a name change of the form
> variable.
> Can anyone refrence me to the rules of what name to expect form variables
> in different situations ? Its not at all obvious to me !!!
> I'm also concerned that its a difficult maintance issue this way, if later
I
> go back
> to the form and make a minor modification .. then my custom code can
break,
> and often it breaks very quietly ... all SQL errors are turned off ... it
> just appears
> to work but one or more custom statements dont do what they should ...
> the errors only appear later as incorrect values in the database.
>
>
>
>
> --------------------------------------------------
> David A. Lee
> Dal Enterprises Inc.
>dave@calldei.com
> http://www.calldei.com
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.