Lookup column output includes strange characters.
Hi all,
I have a lookup column ("Priority"), that returns a number, which it looks-up from a different list (obviously).
I have a workflow that emails the user when the list item is created, and in that email I have included the Priority field. However, the email is showing the contents of the Priority field along wth other characters - an example is:
The column in the list says 3
The column in the email says 3;#3
What's going on? Why is it adding the additional characters to it? I'm not sure where it's coming from? This only seems to happen where a lookup column contains a number.
Thanks in advance.
Duncan
July 3rd, 2010 12:41pm
one part is actual value, the other part is id of that item in the list to whom it is a lookup.
its a standard seprator ;#
you can use in ur code either the value or the item id as required.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2010 8:48pm
Hi hemantrhtk
Thanks for your reply - not sure I understand what you mean though. I can see where that's coming from now yes, but in my workflow, I am merely inserting a lookup into the body of the email that is a column from the "current list" -i.e. when I click on [Add
Lookup to Body] > I choose Current List > Priority and it inserts it into the email like this:
[%Nameoflist:Priority%]
Which it does with all the other columns I insert - yet in those other columns I get the value of the column only - no ";#" - so why would it appear when I insert the priority column?
Duncan
July 3rd, 2010 10:35pm
Does anyone else have any suggestions for this?
I've included an example if it's of any help:
An example email that I want to send is:
**********************************************************************************
This is to notify you that a call has been assigned to you:
Shop: 89 -
1756;#SHOP ADDRESS GOES HERE
Date and time the call was initially logged: 03/07/2010 19:09:19
Your REFERENCE for this call is: 9
The priority set for this call is: 5
**********************************************************************************
In the above example, there are two columns – “Shop Number” and “Shop Details”. Shop Number is a standard SharePoint lookup column to another list. Shop Details
is a cascaded lookup column to the same list, but is filtered by the Shop Number column (so when the Shop Number changes, the Shop Details change too).
But as you can see, instead of showing the Shop Number – Shop Details which should read:
Shop: 89 - SHOP ADRESSS
It shows a hash symbol and what looks like the
auto-generated ID column associated with the Shop Details item:
Shop: 89 -
1756;#SHOP ADDRESSWhy would it be including that extra information and the # symbol? All I am doing is looking-up the “Current Item” in the workflow list
when I insert it in to the email in the workflow?
Hope this is of some more help!
Thanks in advance
Duncan
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2010 5:57pm
dmcdonald50, have you found any fix to this yet? I'm having the same problem with two columns in my SP system. We are getting ready to deploy and this is a major headache. I've even tried doing a Find/Replace command in a 2nd calculated
column to 'clean it up' =REPLACE(Columnname,FIND(";#",Columnname,1),FIND(";#",Columnname,1)," ") and it does not work exactly as it does in Excel.
Thanks and good luck to you. We are using cascaded lookup as well.
Regards,
Pat
August 9th, 2010 6:08pm
u
can create an object of type SPFieldLookupValue and than use value or id property as required
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldlookupvalue.aspx
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2010 10:19am


