This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Changing Form by Working Environment

Our use case for SBM requires us to have it operate differently in multiple working environments (i.e., different field requirements), but I'm not finding a straightforward way to do that

As far as I can tell, Application Variable settings are only used to compare the fields of an item during a Rule check, and don't necessarily seem to accomplish what I need

Does anyone have a suggestion on how this could be done?

  • 0  

    HI. How would SBM recognize your "working environments"? Are they identified by a field in the SBM form or by something external of SBM such as the location of your PC or Browser?

  • 0 in reply to   

    That's part of the problem, is figuring out how to set that up

    Initial idea I had was to set up an Application Variable with a different value for each environment, but I'm not finding any way to reference the variable

    Second idea was to have it as a database entry that could be queried by the JavaScript, but I'm not particularly familiar with the REST or Web Service calls to be able to do that

  • Verified Answer

    +1  

    HI, 

    Here are a couple of ideas one of which expands on what Garry asked.  It can be easy to hide show fields, but not move fields to different privilege sections.  If you want move fields to different privilege sections then you override the privilege section at the project level.  If you do override at the project level, you will likely not be able to promote between enviornments.

    Option 1 would be to add a single select field to the table that gets defaulted to the environment name.  This would be a project level default.  With this field on the form, you can use form actions to hide or show fields.

    Option 2 would be to use javascript, window.location.hostname, to determine which environment is being accessed.

    David

  • 0 in reply to   

    Option 2 actually might work, the different environments do use different URLs, so hostname would return specific values

    I'll have to give it some experimentation, but that's a good avenue of approach

    Thanks!