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
+1
person also asked this
people also asked this
Replies
4 replies
Answers
3 answers
Subscribers
11 subscribers
Views
6753 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
urlForRecord function for Sites
hiteshd
Certified Lead Developer
over 8 years ago
Hi All,
urlForRecord function can be used to navigate to a record dashboard directly by passing the recordID. Do we have something similar for records which are part of Sites. For example, I want to divert a user from an external portal to a specific record dashboard on Appian site once authentication is done.
Thanks.
Hitesh
OriginalPostID-251745
Discussion posts and replies are publicly visible
Parents
0
sikhivahans
over 8 years ago
@hiteshd From my search I didn't find any. However you could still produce the url by writing an expression rule. Please find attached the image and code snippet that will help you in getting the url of a record that lies in a page of the site.
Few things to note:
1. I have used a!recordLink() to get the unique identifier of the record being generated by Appian as part of record's url. This is because fn!urlforrecord() failed in deriving a valid value. If you have time, I would suggest trying the fn!urlforrecord and get the identifier and test the same as the usage of a!recordLink() isn't a standard approach. In case if someone is interested in this, I have tried fn!reverse(fn!split(fn!urlforrecord(ri!recordType,ri!recordIdentifier),"/"))[3] but this identifier didn't work for sites though the same worked for tempo environment(maybe I am missing something?).
2. I have used rule!APN_getSiteUrl() but I would suggest not to use it as this rule makes use of a deprecated function and I have used it just for demonstration. Use an expression rule or constant or query rule that drives the site url specific to the environment.
3. Implement this code as an expression rule and reuse the same so that it would be easier to replace its contents or deprecate it when Appian relases a equivalent OOTB functionality or makes changes in the functions that were used in this expression rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sikhivahans
over 8 years ago
@hiteshd From my search I didn't find any. However you could still produce the url by writing an expression rule. Please find attached the image and code snippet that will help you in getting the url of a record that lies in a page of the site.
Few things to note:
1. I have used a!recordLink() to get the unique identifier of the record being generated by Appian as part of record's url. This is because fn!urlforrecord() failed in deriving a valid value. If you have time, I would suggest trying the fn!urlforrecord and get the identifier and test the same as the usage of a!recordLink() isn't a standard approach. In case if someone is interested in this, I have tried fn!reverse(fn!split(fn!urlforrecord(ri!recordType,ri!recordIdentifier),"/"))[3] but this identifier didn't work for sites though the same worked for tempo environment(maybe I am missing something?).
2. I have used rule!APN_getSiteUrl() but I would suggest not to use it as this rule makes use of a deprecated function and I have used it just for demonstration. Use an expression rule or constant or query rule that drives the site url specific to the environment.
3. Implement this code as an expression rule and reuse the same so that it would be easier to replace its contents or deprecate it when Appian relases a equivalent OOTB functionality or makes changes in the functions that were used in this expression rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data