Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
11 replies
Subscribers
9 subscribers
Views
6640 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Linking to an Action or Report
Kyle Jorgensen
over 8 years ago
What is the best way to link to an action or report other than directly using the URL? Since the links would be different between our environments I would like to avoid directly hard coding a URL in.
OriginalPostID-259948
Discussion posts and replies are publicly visible
0
Raviteja Varma Jampana
A Score Level 2
over 8 years ago
If you are looking for picking URL of environment without hard coding use rule!APN_getSiteUrl().
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Kyle Jorgensen
over 8 years ago
Thanks, that should work for reports since they have the same path across environments. Is there anyway to reference an action since they have different paths?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Raviteja Varma Jampana
A Score Level 2
over 8 years ago
Cheers Kyle, I am not aware about any options that will let you to trigger action through links. I think it is possible only in sites where we can configure tab for an Action and on going to that link we can see its start form.
Could you please let me know whether you application works only on tempo,only on sites or a combination both tempo and sites so that i can think about any possible work around to do this?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sparshs
over 8 years ago
Why cannot you have that URL in a constant and once you change the environment. You just have to change the constant value.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
thanigaivelr
over 8 years ago
note that rule!APN_getSiteUrl() uses fn!linktodocument() which has been deprecated and may be removed in a future release.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Josh
Certified Lead Developer
over 8 years ago
@kylej The only way I've been able to trigger an action via a link is by saving the url of the action into a constant in each environment and referencing said constant.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Kyle Jorgensen
over 8 years ago
I've been avoiding creating a constant with different values per environment since there would be a risk that a subsequent transport would break the link in Production (if the transport package includes the Dev version of the URL it will overwrite the Prod version when imported).
I think what I may do is store the Prod URL in a constant across all environments and inform testers not to avoid the link in the Test environment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Josh
Certified Lead Developer
over 8 years ago
The recommended approach here is to create a separate application for environment specific constants and to not put these constants in your main application. That way you don't accidentally overwrite the constants during a deployment.
I also typically include a "ENV" tag (ex. APP_ENV_YOUR_CONSTANT) and do a quick "ENV" search in the application before deploying to make sure I'm not exporting environment specific constants.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Kyle Jorgensen
over 8 years ago
@joshl, that method seems like it might be best. It reduces the risk of overwrites while preventing Prod processes getting kicked off by devs/testers.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vasilisg
over 8 years ago
Another workaround to get the working environment is by creating an expression that has the following:
urlforrecord(cons!RECORD_TYPE,1)
where cons!RECORD_Type is a constant of record type and the 1 does not matter just enter an integer, that way you can get the URL and using data manipulation the environment can be extracted.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>