<?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 get the environmental URL</title><link>https://community.appian.com/discussions/f/general/9644/expression-to-get-the-environmental-url</link><description>Hiya all, Is there an expression that can be used to the the base URL for the environment - the xx.yy.com/suite part? TIA, Gareth OriginalPostID-259636</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/89412?ContentTypeID=1</link><pubDate>Fri, 31 Dec 2021 00:58:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b85ae55a-8e7a-438a-81f3-a95e24d73fb3</guid><dc:creator>Navin Reddy</dc:creator><description>&lt;p&gt;regexfirstmatch(&amp;quot;https://[a-z]+\.[a-z]+\.[a-z]+&amp;quot;,a!urlfortask(0))&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/48734?ContentTypeID=1</link><pubDate>Fri, 22 Sep 2017 04:59:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:49126b3f-c44a-471a-a53d-7bf22500d87c</guid><dc:creator>ashish.deshmukh</dc:creator><description>If you are working on 17.x version, you can make use of Customization settings provided by Appian. Here you can mark the constants as environment specific constants and maintain those using Import Customization file. Refer below link for more details, &lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/17.2/Application_Deployment_Guidelines.html#Import_Customization"&gt;docs.appian.com/.../Application_Deployment_Guidelines.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/48727?ContentTypeID=1</link><pubDate>Fri, 22 Sep 2017 02:12:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:45f8bc46-eb46-41ad-8b2b-756f59dc68f7</guid><dc:creator>josep</dc:creator><description>Hi Alexandera, &lt;br /&gt;
&lt;br /&gt;
When talking about environmental variables I would suggest to add a &amp;quot;{Company} Common Application&amp;quot; which can be setted and managed by the admin team. This is recomended for all the environment specific variables. &lt;br /&gt;
&lt;br /&gt;
Best Regards &lt;br /&gt;
Jose P&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/48724?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2017 16:31:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d091759a-a20c-4d39-a61e-3c424402f095</guid><dc:creator>Mike Schmitt</dc:creator><description>Of course this is now unnecessary in 17.1 and above - simply set environment constants as &amp;quot;environment specific&amp;quot;, and then even re-importing a newer version of a constant won&amp;#39;t overwrite the version currently on that environment.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/48723?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2017 16:09:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4917f50f-8179-42a2-98ec-9dda1d887fba</guid><dc:creator>alexandera</dc:creator><description>To avoid environmental constants from being overwritten by accident when deploying to higher environments, you can keep all of the environment dependent constants in a separate application, so when stories/applications/releases/bugs/etc. get deployed, the environment objects never get accidently deployed or overwritten. However, this means an extra step must be added to &amp;quot;deployment instructions&amp;quot; to handle manually editing environmental constants from one env to another.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/48651?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 02:17:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:234118f3-3a96-445e-989d-13ca9374bf4a</guid><dc:creator>josep</dc:creator><description>I would suggest to make a mix between a constant and this rule(concatenating rule!rule() &amp;amp; cons!APN_SITE_LINK), If you are thinking about sites that will absolutely work, even for task creating the link will be enough. &lt;br /&gt;
In case you need records there is an appian function to get them.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/48619?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 12:37:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f30c2aa-f832-49cd-9969-35e5f4d99a8e</guid><dc:creator>Satty</dc:creator><description>Thanks for that, but it is returning url till suite only, if i need entire UrL along with sub pages and parameter like; &lt;br /&gt;
&lt;a href="https://www.appian123.ca/suite/sites/supplier-contact-registration?msg=1"&gt;www.appian123.ca/.../supplier-contact-registration&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
then, if anyone has any idea, do suggest &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
thanks&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/44348?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 18:03:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5edf866a-a59d-4887-943c-11db496e488e</guid><dc:creator>sam.zacks1</dc:creator><description>Additionally you can create a constant and point directly to the user record since it will always exist in the application.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42423?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 11:22:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:56f6ae0e-c4d3-41e7-bda2-b54ef19a2819</guid><dc:creator>garethm</dc:creator><description>Thanks - much more comfortable using this than a deprecated function.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42373?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2017 14:07:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e00c0958-2712-42f0-af7f-e500bc9e0666</guid><dc:creator>Puspendu Pal</dc:creator><description>If you dont want to use the deprecated method, you may try to get the base URL(xx.yy.com) using urlforrecord as follows:&lt;br /&gt;&lt;br /&gt;with(&lt;br /&gt;  local!anyURL: urlforrecord(&lt;br /&gt;   recordType: ri!recordType,&lt;br /&gt;   identifier: ri!recordIdentifier&lt;br /&gt;  ),&lt;br /&gt;  left(local!anyURL,search(&amp;quot;/suite&amp;quot;,local!anyURL))&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42369?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2017 10:22:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3111446d-c61b-4b6d-bb9f-f385d36b21bd</guid><dc:creator>Tim</dc:creator><description>Its always a rick using a deprecated function. The environment constants should be in a standalone app with a description that states they should only be deployed once and that app excluded from the dependency checks on other apps. Relies on people reading instructions of course ;-)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42368?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2017 10:00:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d17a7506-90e8-4f24-a997-9c491727e975</guid><dc:creator>garethm</dc:creator><description>Hiya Tim&lt;br /&gt;We had that system (constant, array constant and a choose statement which you set up for us!)... but the environmental constant can be easily overwritten by accident which changes the behaviour of the site - not by me I hasten to add!&lt;br /&gt;&lt;br /&gt;So I was looking for a more fool-proof way to identify the environment and use that instead.&lt;br /&gt;&lt;br /&gt;rule!APN_getSiteUrl() seems to work nicely...just hoping that the deprecated nature does not come back to haunt me!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Gareth&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42366?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2017 09:54:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b982d10e-4eed-4bb0-921d-352fb0315967</guid><dc:creator>Tim</dc:creator><description>Hi Gareth! You consider having an application that contains constants to store these values and then deploying and modifying per instance for your environments. These can be very useful for things such as dynamic WSDLs.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42342?ContentTypeID=1</link><pubDate>Mon, 23 Jan 2017 21:07:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05e26a9a-e52d-4699-848e-a70a0c1bd347</guid><dc:creator>Josh</dc:creator><description>note that rule!APN_getSiteUrl() uses fn!linktodocument() which has been deprecated and may be removed in a future release.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42335?ContentTypeID=1</link><pubDate>Mon, 23 Jan 2017 18:38:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d637e2bd-1dbd-4408-ab95-66b5d0eeaac8</guid><dc:creator>garethm</dc:creator><description>Thanks - perfect!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: expression to get the environmental URL</title><link>https://community.appian.com/thread/42333?ContentTypeID=1</link><pubDate>Mon, 23 Jan 2017 18:34:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:64d02a29-315b-4987-8291-2558a5b0090c</guid><dc:creator>Ram</dc:creator><description>Hi Gareth,&lt;br /&gt;&lt;br /&gt;rule!APN_getSiteUrl() might solve your problem. Hope this helps&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>