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?

  • 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
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']

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.