I'm using a script-based solution to add a Comment Box to dispform.aspx in a MOSS document library. The comments live in a separate list and I have a requirement to show the Name metadata from the document library in every item in the comments list. The only metadata passed from the library to the comments list is the URL of dispform.aspx, e.g. http://sitename/library/dispform.aspx?ID=1.
If I could parse out the ID in a calculated column or with workflow (I need a no-code solution) with something like substring-after([URL],"=") then I could use workflow to fetch the Name metadata but I can't seem to work out the method to extract the ID from that URL string. Probably missing something obvious (as usual) but could use some help. Suggestions?