URL link in a view column which has response docs only to open the parent document

Hi all

1) I have a view that stores response docs only.
2) view has 2 columns,
3) column1 has the description field which is found on response doc
4) column 2, i want to include a text "Click here" where when clicked it will open the associated parent document to this response doc
5) I have place the following behind column 2 to open the document, but it seems to take me back to the response doc instead of the parent

"<td align='left'><a href='test?opendocument&ParentUNID="+@Text(@DocumentUniqueID)+"'>Click Here </a></td>")

That's not working


Also not working

Your ideas on how to fix this is much appreciated


Who is Participating?
Bill-HansonConnect With a Mentor Commented:
You're close, but if you want to open the parent document, then the URL must contain the parent document's UNID.  The UNID of a response document's parent is contained in the $REF field.  So the url you need to use should look like this...

viewName := "Parents";
"<a href=\"/"+ @WebDbName + "/" + viewName + "/"+@Text($REF)+"?OpenDocument\">Click Here</a>"

If the current view contains the parents, then you could change the first line to...

viewName := @ViewTitle[1];
madheeswarConnect With a Mentor Commented:
U should be using:
"<td align='left'><a href=\"/"+"viewname/"+@Text(@DocumentUniqueID)+"?opendocument&ParentUNID="+@Text(@DocumentUniqueID)+"'>Click Here </a></td>")

Give it a try.
If possible try to build a URL and open the same on web and check.
varvouraAuthor Commented:

I needed to add the square brackets to your formula and then it worked perfect.

viewName := "Parents";
"[<a href=\"/"+ @WebDbName + "/" + viewName + "/"+@Text($REF)+"?OpenDocument\">Click Here</a>]"


Many thanks for trying to help, I am sure I'll be able to use your formula in various other scenarios


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.