<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/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>Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/discussions/f/general/26262/expression-to-return-screen-type-phone-desktop-tab-desktop_wide-etc</link><description>I want to get the current screen type in which my interface opened. Here screen type I mean : &amp;quot;PHONE&amp;quot; , &amp;quot;DESKTOP&amp;quot;, &amp;quot;DESKTOP_WIDE&amp;quot; etc I tried using a!isPageWidth() but that is not working for my requirement. Please help me with this. Thank you in advance</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103064?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 05:23:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:03afff69-3d96-46ce-97bb-8c465f41e214</guid><dc:creator>anita</dc:creator><description>&lt;p&gt;Yes its working fine with nested if. Thank you !!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103061?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 05:14:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eeaf921a-0ea0-4733-992e-8d34ab92fb7d</guid><dc:creator>anita</dc:creator><description>&lt;p&gt;yes working perfect, Thank you so much&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103047?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 17:19:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7aa91da2-4660-479a-ba5a-38c45139ffaa</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I suppose it might be helpful to build it in such a way that we could maintain a separate array of valid widths (like in a constant) then have a rule simply iterate over that list and find the valid width (if any).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;/* rule!GLBL_getPageWidth() */
a!localVariables(
  local!widths: {
    &amp;quot;PHONE&amp;quot;, &amp;quot;TABLET_PORTRAIT&amp;quot;, &amp;quot;TABLET_LANDSCAPE&amp;quot;, &amp;quot;DESKTOP_NARROW&amp;quot;, &amp;quot;DESKTOP&amp;quot;, &amp;quot;DESKTOP_WIDE&amp;quot;
  },

  index(
    a!flatten(a!forEach(
      local!widths,
      if(
        a!isPageWidth(fv!item),
        fv!item,
        {}
      )
    )),
    1,
    &amp;quot;Unknown&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103046?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 17:13:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:34c16070-9afd-470f-9b7d-6c3f5030534e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;It does seem a bit backwards that we require such a work-around to GET the current page width - to me it seems like there should&amp;#39;ve just been a &amp;quot;a!pageWidth()&amp;quot; function that RETURNS the current page width, i.e. the inverse of what we have to do with a!isPageWidth.&amp;nbsp; I assume they have reasons, but...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103030?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 14:11:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3c8da3a4-95ee-4092-82fb-eabb25b23166</guid><dc:creator>ujjwalr0002</dc:creator><description>&lt;p&gt;Hi it is not having exact same as you want but please check the stackWhen component on the columns layout&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/22.3/Columns_Layout.html"&gt;https://docs.appian.com/suite/help/22.3/Columns_Layout.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Edit: You can try this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!richTextDisplayField(
  value: 
  if(
    a!isPageWidth(&amp;quot;PHONE&amp;quot;),
    &amp;quot;PHONE&amp;quot;,
    a!isPageWidth(&amp;quot;DESKTOP&amp;quot;),
    &amp;quot;DESKTOP&amp;quot;,
    a!isPageWidth(&amp;quot;DESKTOP_WIDE&amp;quot;),
    &amp;quot;DESKTOP_WIDE&amp;quot;,
    a!isPageWidth(&amp;quot;DESKTOP_NARROW&amp;quot;),
    &amp;quot;DESKTOP_NARROW&amp;quot;,
    &amp;quot;i DONT KNOW&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103029?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 13:59:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:57d5406a-7f88-48c5-8ebe-b8eba44293e3</guid><dc:creator>anita</dc:creator><description>&lt;p&gt;a!isNativePhone() and&amp;nbsp;a!isNativeTablet() both functions are deprecated from appian new version.&lt;br /&gt;And these functions will return true/false.&lt;br /&gt;But my requirement is dt it has to return screen type only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression To return Screen type (Phone, Desktop, tab, desktop_wide etc)</title><link>https://community.appian.com/thread/103028?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 13:43:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9600560-6e92-4c72-baed-3c13c40e2fc9</guid><dc:creator>ujjwalr0002</dc:creator><description>&lt;p&gt;Tablet : &lt;a href="https://docs.appian.com/suite/help/20.1/fnc_scripting_isNativeTablet.html"&gt;//docs.appian.com/suite/help/20.1/fnc_scripting_isNativeTablet.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Phone :&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/20.1/fnc_scripting_isNativePhone.html"&gt;https://docs.appian.com/suite/help/20.1/fnc_scripting_isNativePhone.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>