2

I have a field in my list, which is a url (field type is single line of text), and in my JSLink, I want to retrieve this field to assign it as src for an image, but when I use CurrentItem.SrcUrl, it brings something like this: url, which is not the url that I need, I would just need the url value, what do I do in this case?

SharePoint Freak
  • 1,378
  • 7
  • 26
  • 39
  • is it a custom column? did you map the property on your web part? – Salvatore Di Fazio Apr 23 '14 at 10:41
  • I don't have a web part, I am using JSLink to read the column, the column type is single line of text but contains a url, it's retrieved as <a href ... is there a way to get the url directly from this column? – SharePoint Freak Apr 23 '14 at 12:50

1 Answers1

2

If you have a SPFieldUrl called Foo then you should have a the url in CurrentItem['Foo'] and the description in CurrentItem['Foo.desc']

Nils
  • 2,327
  • 15
  • 32