Skip to main content

Search

Site dependent visible object

Comments

2 comments

  • Christof

    Hi Dale

    There are several approaches for that case - best two that comes into my mind:

    1. Check the Web/Site URL
    Prerequisite: you have something in the site url you can differentiate prod from test site 
    Check if the current url contains specific text  like this:

    =[[@Web.ServerRelativeUrl]].contains("test")

    2. Configuration List Entry
    Create a (hidden) config list in the site.
    Create a list entry containing a Prod-Flag or a choice field System Type with values "Test" and "Prod" which you can set on each site different.
    To check this flag/value on the form's Visible Expression use the GetFirstValueForQuery function like this:

    =[[@Web.GetFirstValueForQuery('YourConfigList', '<Where>filter to get back the correct config list entry</Where>', 'YourSystemTypeFieldName')]]=="Prod"
    0
  • Dale Zach

    Thanks Christof, this is just what I needed.

    0

Please sign in to leave a comment.