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
9 replies
Subscribers
7 subscribers
Views
3706 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi .. We are using a!recordLink inside gridTextColumn to direct to a custom dash
kumaraveln
over 9 years ago
Hi .. We are using a!recordLink inside gridTextColumn to direct to a custom dashboard in a record .. When we click on the hyperlink its opening the custom dashboard in the same page instead of a new tab.
Because of this we are facing one issue. Wheni use this hyperlinik in REPORTS, its not a prob. But when i use the same in a task (Initiated from ACTIONS), whenever the hyperlink is selected its warning the data will be lost (as in when we try to close a tab / navigate away from the task page).
How to make the link open in a new tab / new window using the same recordLink or by wrapping it with some other rule ?
OriginalPostID-184773
OriginalPostID-184773
Discussion posts and replies are publicly visible
0
sonalk
over 9 years ago
Hi Kumaraveln,
The a!recordLink will open the record in the same tab or window. You can make use of the a!safeLink instead of a!recordLink and in a!safeLink function's uri parameter call the urlForRecord() function and it will ensure to open it new tab.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
Hi .. i tried your idea and it worked .. link opened in a new tab .. but i can only define the recordType in urlForRecord() which will take me to the summary dashboard .. but i need to direct user to a custom dashboard in the same record .. so is there a way to define destination dashboard either in urlForRecord() or a!safeLink ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
My Code is,
a!gridTextColumn(
label: "Some ID",
data: local!datasubset.data.someId,
links: a!applyComponents(
function: rule!renderSafeLink(
recordType_rty: cons!MY_RECORD_TYPE,
identifier_any: _,
dashboard_txt: cons!MY_CUSTOM_DASHBOARD_URL
),
array: local!datasubset.data.id
)
)
rule!renderSafeLink
a!safelink(
label: "My link",
uri: urlforrecord(
ri!recordType_rty,
ri!identifier_any
)
)
Now we dont have a way to say this link to point to a different dashboard in the same recordType
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 9 years ago
Links to a certain view for a record look like
/suite/tempo/records/type/xxxxxxx/item/jcBoUfugxHzyfvxYtPKohiwr5P-qL73ra9AG5SpO1wpOL8VVU3TDm7GOtOAOycvYkww_uK5BP41/view/_YEMSIw
The last part, in this case "/_YEMSIw", defines the view. Have you tried to use urlforrecord and then just add that view name? If that works, check if it is different for separate Appian environments after deployment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
Thanks stefanh .. that worked .. hope the view URIs wont change over environment adding steps in deployment guide .. anyways will check that and update here ..
Below is the working code pattern
:
rule! renderSafeLink
with(
local!uri_txt: tostring(urlforrecord(ri!recordType_rty, ri!identifier_any)),
a!safeLink(
label: "",
uri: concat(
left(local!uri_txt, len(local!uri_txt) - 7),
ri!dashboard_txt
)
)
)
Please let me know if this is not a proper way of doing it ..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@kumaraveln Hi, not sure if you have already explored the forum but there are few posts re this. For instance, you could take a look at the post at /search?q=OriginalPostID-154622. I have outlined a method in this post and @amitl has specified the implementation using substitute function. As per my knowledge, I think the identifiers won't vary from environment to environment.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
Thanks sikhivahans .. using substitute() looks better than using left() and concat() .. hoping the url will never have the keyword summary in any other part of it except the end :)
Looks like this is the only workaround until appian introduces an attribute in urlforrecod() to specify alternate view or provide a new function like urlforrecordview() ... :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 9 years ago
Why not split the URL by "/", strip of the last part, add your view identifier and rejoin again using "/"? This way the word "summary" is not relevant.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
kumaraveln
over 9 years ago
As you said, there are multiple ways to do it using different text functions .. Developer can pick their choice which takes less evaluation time comparatively ..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel