Works in development not in production

I have a grid with variable column names. Onscriptinit it grabs the column names from a table and runs through a FOR loop to assign them to a global variable. The variables are set to =0 initially. When it runs through the loops, there is a case that says if([r4]==0){ sc_field_display({rehearsal4}, off);

It works fine in development. In rehearsal, it displays the field with a header of 0. Development is windows…production hostgator linux. Is there a different way I should be saying it? Probably something obvious.

Hi mollyshark,

When I’ve had problems deploying from development to production, problems have always been due to global variables. This may or may not be the same problem that you’re seeing, but you have to remember that global variables in scriptcase are php “Session variables”. This means that in development, your global variables always stick around until you close the IDE (browser) and reopen it or the session times out.

You development code may be working because your session variable are set from previous development actions. In production, your global variables start from fresh and follow your business logic /workflow.

I would recommend clearing the session variables in development and trying it again, you may find your app no longer works in development… It might then give you a clue where a bug lies.

To delete your session variables, got to Application → Data In Session and delete the variables you’ve created; the save button is at the very bottom of the mile long page.

I hope that helps