Ok, I've never liked the process to start a workflow:
- from the listing of items
- viewspecific item in list
- hit workflows
- hit appropriate workflow
Far too many clicks for my liking. I've been looking for a workaround to this and the closest I could get was a hard-coded link in a custom XSLT data view.I started it off with a standard list view, includinga Status column. Within the XSLT, I've added...
<xsl:choose>
<xsl:when test="@Status='Ready-To-Go'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('/hard/coded/url/to/Workflows/WorkflowName/WorkflowName.aspx?List=[hard-coded GUID]&TemplateID=[hard-coded GUID]','ID=', @ID)" />
</xsl:attribute>Starta workflow Manually</a>
</xsl:when>
<xsl:otherwise><xsl:value-of disable-output-escaping="no" select="@Status" /></xsl:otherwise>
</xsl:choose>
The main problem of course is the amount of hard-coded things I put in there. Not only can I not seem to grab the URL of the sharepoint url, the list guid is hard-coded and the templateid is hard-coded.Really the only thing going for it is that ID that gets populated.
I'm sure there's many-a way to get this done with visual studio and I could probably even bundle the workflow so it could be applied elsewhere. Unfortunately, I'm unable to get into visual studio and I don't have access to change the server configuration.... Basically stuck with SPD.
If anyone has an elegant solution, please share?