CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Strange Windows 8 behaviour

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 05/06/2013, 5:20 AM

A record form with two hidden fields that default to CCGetSession("UserID") and the other to CurrentDateTime.

If the control source is filled in, neither field gets the default value. If the control source is left blank, both fields populate correctly.

Any bright ideas?
View profile  Send private message
bannedone


Posts: 273
Posted: 05/06/2013, 7:21 PM

I think that is normal behavior..


_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message
bannedone


Posts: 273
Posted: 05/06/2013, 7:23 PM

LOL What Tim4zone is the forum now set to???

I am making this post at 1:30 pm PDT


_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
View profile  Send private message
saseow

Posts: 744
Posted: 05/07/2013, 2:20 AM

Hardly normal at all!
View profile  Send private message
DataDoIT
Posted: 05/07/2013, 11:49 AM

Think about what's happening... It will set the control's Default Value
to whatever. However, if there is a value already there, then it will
use that value instead. That will occur if the control is bound to a
database field.

So setting a Default Value in the Data Tab says this will be the value
if there is no value. To set a different value if there already is a
value for the field, go to Events and choose the 'Retrieve Value for
Control' action for the control, and set your value there.

Ex: Let's say you have an Updated By field in your data table and you
want it updated every time someone saves the record. Put a hidden
control in your form and bind it to your Updated By field, then for the
control's Before Show, Retrieve Value for Control and set it to
Expression and Source Name of CCGetUserID().
saseow

Posts: 744
Posted: 05/07/2013, 11:59 AM

Exactly!

The problem is that it will not store the value into the database for a brand new record. It doesn't even populate the field with the default value.

If I change the hidden field to a text box or label having set up the default (CCGetSession(":UserID") or even a number e.g. 11, AND the control field is set correctly, that component will always be empty when the form loads to add a new record.
If you don't set the control field, the component gets populated correctly.
View profile  Send private message
saseow

Posts: 744
Posted: 05/07/2013, 12:06 PM

If you think that is weird, how about this:

If you are setting up the sql for a grid, form or whatever and want to put in the Order By clause.....don't select a field from the dropdown list. The SQL editor will close immediately.
If you type in the field name, no hassles.
View profile  Send private message
DataDoIT
Posted: 05/07/2013, 1:07 PM

Then I would suggest you validate the existence of the session variable
"UserID". Rather than attempting to grab the session variable directly,
use CodeCharge's built-in functions that grab that stuff for you:

CCGetUserID()
CCGetUserLogin()
CCGetGroupID()

Then it won't matter what you named your session variables - as declared
in your Project Settings -> Security -> Advanced.

There are many debugging tools available for checking session variables
and cookies. My recommendation is Burp Suite
(http://portswigger.net/burp/).
saseow

Posts: 744
Posted: 05/07/2013, 1:14 PM

I will try that and see what happens but don't hold out much hope.
As I said, even if I put in a default value of 11, i.e. nothing to do with get the session variable, it still will not put that into the component as the default.
View profile  Send private message
DataDoIT
Posted: 05/07/2013, 1:43 PM

Verify that the component is not bound to a data record field (Control
Source). If it is, it will grab that value instead. If the value in
the database is an Empty String (not NULL, that's different!), then you
will also see nothing.

Let me safely declare with 99.9999% certainty that this is NOT a Windows
8 problem. There is a greater chance that this is a browser problem
(cache?), and even that is slim.

As I often mention in this forum, spend a considerable amount of time
setting up your development environment, and that includes preparing
yourself for debugging. A great place to start is to install VirtualBox
(https://www.virtualbox.org), for which in this particular case you can
easily eliminate an operating system issue by running a virtual machine
with Windows 7 and CCS and see if your problem persists. It will save
you the inevitable embarrassment of declaring an OS bug that 100+
million other users in our solar system have not seen.
saseow

Posts: 744
Posted: 05/07/2013, 1:52 PM

I hope you are right about iut not being a Win8 hassle.

The component is bound to a field but when creating a new record it is of course empty, hence the need for the default.

I have tried in Opera, IE, safari and FF with the same results so it is not a browser thing.
I have reinstalled CCS and that does not help hence my conclusion that it is a WIN8 hassle.

Any more ideas will be greatly appreciated!!!!!!!
View profile  Send private message
saseow

Posts: 744
Posted: 05/07/2013, 1:53 PM

btw, the problem does not appear in windows XP at all. That is the only other OS I have available.
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 05/09/2013, 12:44 AM

@saseow - make sure the .php project file does not contain a whited out area for the form on the Win 8 box?


_________________
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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