none
Workflow variables for filename or document library or relative path

    Question

  • I'm using the Approval Workflow (2010) and unfortunately the emails that are generated will sometimes give a non-FQDN url when using the variables Encoded Absolute URL, Current Item URL, or Current Site URL.  I need it to always be an FQDN url and can't make sense why it will, which seems to be random, generate the link as a non-FQDN.

    Anyway, I figured I would just hard add the FQDN server part of the URL but I'm having a hard time finding any variables for the filename, document library, or ideally a variable for a relative path.  A variable for any one of those would be helpful in resolving this.  Any suggestions?

    Tuesday, December 13, 2016 1:41 PM

Answers

  • Here's how I finally resolved it in case this is useful to anyone else that has this issue:

    For a link to the document, use: [%Task Process:Web URL%]/[%Task Process:Item URL%]?Web=1

    The "?Web=1" is optional but will open the document in Office Web Apps if you're using that.

    For a link to the form for approval/reject/etc: [%Task Process:Web URL%]/_layouts/15/WrkTaskIP.aspx?List={<listid>}&ID=[%Current Task:ID%]

    <listid> is the ID of the task list.  A variable for that would be great to, but I'm not sure at this point and the actual ID works for my situation.

    • Marked as answer by sixin75543 Wednesday, December 14, 2016 8:59 PM
    Wednesday, December 14, 2016 8:59 PM

All replies

  • Hi sixin75543,

    According to your description, my understanding is that you want to send an email with FQDN URL of the item.

    Could you use the FQDN URL to access the site?

    If so, I suggest you typing your FQDN in the email as below:

    Best regards,

    Grace Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, December 14, 2016 10:53 AM
  • Thanks. That seemed very promising, unfortunately I can't publish the workflow with that variable as it fails the validation.  I'm using SPD 2013 and editing a copy of the Approval - SharePoint 2010 workflow.
    Wednesday, December 14, 2016 2:22 PM
  • Here's how I finally resolved it in case this is useful to anyone else that has this issue:

    For a link to the document, use: [%Task Process:Web URL%]/[%Task Process:Item URL%]?Web=1

    The "?Web=1" is optional but will open the document in Office Web Apps if you're using that.

    For a link to the form for approval/reject/etc: [%Task Process:Web URL%]/_layouts/15/WrkTaskIP.aspx?List={<listid>}&ID=[%Current Task:ID%]

    <listid> is the ID of the task list.  A variable for that would be great to, but I'm not sure at this point and the actual ID works for my situation.

    • Marked as answer by sixin75543 Wednesday, December 14, 2016 8:59 PM
    Wednesday, December 14, 2016 8:59 PM