The checkbox on my binary/trinary field is not showing in my production environment?

Hello, 

I have a checkbox that I display on my form based off of the value of another checkbox. 

I use javascript to display it. The problem I am having is that it works fine in my TEST system. 

When I publish out to Production the checkbox field shows but only the field name displays, no checkbox is present. 

If I remove all javascript from the form the checkbox shows. So, I'm thinking it's javascript related, but why would it work in test and not production? 

When I use the browser debugger its stepping through all of my logic. 

if (performance_var == "Checked)") {

ShowField("INSTALL_PERFORMANCE");

}

else

{

HideField("INSTALL_PERFORMANCE");

}

Scratching my head on this one. Any help is Welcome. 

Regards,

Will

  • 0  

    Did you try checking the values of the variables as you step through to verify?

  • 0 in reply to   

    Yes, I use the debugger from edge and I've also tried chrome. The code behaves as expected, the debugger gets the proper values and my breakpoints step into the if statement as expected. The field appears as expected, just no little check box to check. 

    Had a similar issue with these fields when I had them set them up as trinary. Had a case open. Decided to move away from the trinary field and back to a binary solution. Worked great in test.... Now after a long development process and push to Production, Production is failing to behave. It has to be something in my javascript just can't it out. 

  • 0   in reply to 

    If you redeploy the same version of process app to test, it works though, correct?

    In your description, the following javascript seems to have an extra parenthesis.  Is this just a typo?

    if (performance_var == "Checked)") {

  • 0 in reply to   

    My bad on the code. I was typing it from one computer to another. Logged on that computer now. Here's an actual copy of the one little section although I don't think it's related to what is causing the problem....?  Throwing everything up against the wall, tried "EnableField" hoping it would force the box.... 

    if (performance_higher_env_var == "(Checked)") {
    ShowField("INSTALL_PERFORMANCE");
    EnableField("Performance Installed");
    }
    else
    {
    HideField("INSTALL_PERFORMANCE");
    }

  • 0   in reply to 

    I vaguely remember running into a similar issue, but it was a long time ago.

    If the code is working on test and not on production and 'performance_higher_env_var' is the same on both, then I would try the following to ascertain if it is something related to your form or coming from the DB. Here are some debugging steps that I would take:

    1. Inspect the code on the page to see if the checkbox is actually on the page and just being hidden. Also try switching form in app admin to a quick form for that transition. See if the checkbox appears.

    2. If answer to #1 is no (something on the back end):

    -try switching the style of a field to a dropdown list  to see if that gets the checkbox to appear.
      - Try taking the field off the form in composer and then re-add it.
    -Ensure that there are no overrides on that transition on the production project.

    3. If answer to #1 is yes (probably something in the javascript),

    - Did you create a custom label for the field so that the field and that is being shown and not the field?

    - Try and manually show the checkbox with jQuerySBM. Add something like this after showfield above: jQuerySBM("#SELECT_"+ LookupFieldId("INSTALL_PERFORMANCE")+"_v1").show() 

  • Suggested Answer

    0 in reply to   

    In our experience, when there's a difference in behavior between environments, it's usually an override in App Admin.

    Check the field settings on the Transition.  Make sure what's present in PROD is same as TEST.