Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+2
person also asked this
people also asked this
Replies
16 replies
Answers
2 answers
Subscribers
10 subscribers
Views
12594 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
expression to get the environmental URL
garethm
over 7 years ago
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
Discussion posts and replies are publicly visible
Top Replies
Ram
over 7 years ago
+1
Certified Lead Developer
Hi Gareth, rule!APN_getSiteUrl() might solve your problem. Hope this helps
Puspendu Pal
over 7 years ago
+1
If you dont want to use the deprecated method, you may try to get the base URL(xx.yy.com) using urlforrecord as follows: with( local!anyURL: urlforrecord( recordType: ri!recordType, identifier: ri!recordIdentifier…
Navin Reddy
over 2 years ago
+1
suggested
Certified Senior Developer
regexfirstmatch("https://[a-z]+\.[a-z]+\.[a-z]+",a!urlfortask(0))
Parents
0
garethm
over 7 years ago
Hiya Tim
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!
So I was looking for a more fool-proof way to identify the environment and use that instead.
rule!APN_getSiteUrl() seems to work nicely...just hoping that the deprecated nature does not come back to haunt me!
Gareth
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
alexandera
A Score Level 2
over 6 years ago
in reply to
garethm
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 "deployment instructions" to handle manually editing environmental constants from one env to another.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 6 years ago
in reply to
alexandera
Of course this is now unnecessary in 17.1 and above - simply set environment constants as "environment specific", and then even re-importing a newer version of a constant won't overwrite the version currently on that environment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
josep
over 6 years ago
in reply to
alexandera
Hi Alexandera,
When talking about environmental variables I would suggest to add a "{Company} Common Application" which can be setted and managed by the admin team. This is recomended for all the environment specific variables.
Best Regards
Jose P
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
josep
over 6 years ago
in reply to
alexandera
Hi Alexandera,
When talking about environmental variables I would suggest to add a "{Company} Common Application" which can be setted and managed by the admin team. This is recomended for all the environment specific variables.
Best Regards
Jose P
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data