<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Simple way to determine if your form is running in filler(preview) or as web page. - infopath 2010</title><link>https://www.infopathdev.com:443/forums/thread/107296.aspx</link><pubDate>Wed, 06 Jul 2016 15:01:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107296</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107296.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=107296</wfw:commentRss><description>So cool - thanks so much for sharing this, Ray!</description></item><item><title>Simple way to determine if your form is running in filler(preview) or as web page. - infopath 2010</title><link>https://www.infopathdev.com:443/forums/thread/107294.aspx</link><pubDate>Wed, 06 Jul 2016 14:49:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107294</guid><dc:creator>rayzermatic</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107294.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=107294</wfw:commentRss><description>&lt;p&gt;There are many times one may want to determine if their form is being viewed in Filler or in a browser to&amp;nbsp;turn on or not turn on some feature based on that option. &lt;/p&gt;&lt;p&gt;I often&amp;nbsp;use it to&amp;nbsp;submit form lock information to a library if it&amp;#39;s in a browser, or not save lock info if I am working on the form and previewing it as I work.&lt;/p&gt;&lt;p&gt;To do this, this is what I do: (This does not require any code or third party plugin.)&lt;/p&gt;&lt;p&gt;1.&amp;nbsp;Create an &amp;quot;isBrowser&amp;quot; boolean (TF) field.&lt;br /&gt;2. &amp;nbsp;Add a new rule in &amp;quot;Form Load.&amp;quot; (I name it &amp;quot;isBrowser&amp;quot; and I make it the first rule in &amp;quot;Form Load.&amp;quot;)&lt;br /&gt;3. In &amp;quot;Condition&amp;quot; add a new condition.&lt;br /&gt;&amp;nbsp;&amp;nbsp; a. Click &amp;quot;The expression&amp;quot; in the dropdown.&lt;br /&gt;&amp;nbsp;&amp;nbsp; b. Add:&amp;quot;xdEnvironment:IsBrowser() = true()&amp;quot; in the text area.&lt;br /&gt;&amp;nbsp;&amp;nbsp; c. Click &amp;quot;OK.&amp;quot;&lt;br /&gt;4. Add an action by clicking the &amp;quot;Add&amp;quot; dropdown and select &amp;quot;Set a fields value.&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; a. In the &amp;quot;Field&amp;quot; area, click the &amp;#39;tree&amp;#39; icon to open the &amp;quot;Select a Field or Group&amp;quot; dialog.&lt;br /&gt;&amp;nbsp;&amp;nbsp; b. Choose your new field, &amp;quot;isBrowser&amp;quot; and set the default setting&amp;nbsp;to &amp;quot;False&amp;quot; if it isn&amp;#39;t already.&lt;br /&gt;&amp;nbsp;&amp;nbsp; c. Click &amp;quot;OK.&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; d. Then click on the FX button in the &amp;quot;Value&amp;quot; area.&lt;br /&gt;&amp;nbsp;&amp;nbsp; e. Click on the&amp;nbsp;&amp;quot;Insert Function&amp;quot; button.&lt;br /&gt;&amp;nbsp;&amp;nbsp; f. Then click on &amp;quot;All&amp;quot; in the &amp;quot;Categories&amp;quot; area.&lt;br /&gt;&amp;nbsp;&amp;nbsp; g. Under the &amp;quot;Functions&amp;quot; area, scroll almost all the way down, and click on &amp;quot;true.&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; h. Click on &amp;quot;OK.&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; I. &amp;nbsp;Click on &amp;quot;OK&amp;quot; again.&lt;br /&gt;&amp;nbsp;&amp;nbsp; j. And click on &amp;quot;OK&amp;quot; once more.&lt;/p&gt;&lt;p&gt;Save your work.&lt;/p&gt;&lt;p&gt;Now, from now on, whenever&amp;nbsp;your form is opened in &amp;quot;Reader,&amp;quot; the &amp;quot;isBrowser&amp;quot; field will be false. But when it is opened in a browser, it will be &amp;quot;true.&amp;quot;&lt;/p&gt;&lt;p&gt;I believe you can do the same thing for mobile use by using &amp;quot;&lt;b&gt;xdEnvironment:IsMobile() &lt;/b&gt;and doing pretty much the same thing above.&lt;/p&gt;&lt;p&gt;I admit I have not tested this for mobile use and would like an update as to what it does.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hope this helps you. It is working just fine&amp;nbsp;for me using either IE or Chrome. I haven&amp;#39;t tested it with any other browsers.&lt;/p&gt;&lt;p&gt;Kind Regards,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Ray&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>