0

How to get images(randomly for specific status) displayed on 'card view' from 'images library' in SharePoint 2013, using REST API in SharePoint Designer 2013?

I've created a column(hyperlink/picture) in a list and uploaded the hyperlink in it and trying to get the image using REST API, but it doesn't seem to be working.

Is my approach right? or kindly suggest me an alternative way!!

Am new in using SharePoint designer.

3
  • Need more information. Provide your REST call.
    – Raf
    Dec 18, 2019 at 9:58
  • "/_api/web/lists/getbytitle('Projects')/items?$select=*,RULine/Name,RULine/internalStatus,ProjectCategory/internalStatus,ProjectCategory/Name,ScientificLead/Title,ProjectStatus/Name,ProjectStatus/internalName,BDOwner/Title,AllInstitutions/Name,AllInstitutions/CCodeInternalUse,AllInstitutions/EUNonEUInternalUse,EndorsingChampion/Title,&$expand=ProjectStatus,AllInstitutions,EndorsingChampion,LegalContactsUsers,YTeamUsers,BDOwner,ProjectType,SGG,ScientificLead,ProjectCategory,RULine,samplelogo&$orderby=Title asc" Here samplelogo- hyperlink/picture column. Can you please explain this REST call? Dec 18, 2019 at 12:02
  • generally, 'select=*' means to select all, right? But in this case, after selecting all the columns, what is the query after comma? Please explain, since am new to SharePoint & REST Api Dec 18, 2019 at 12:06

1 Answer 1

0

You need to exclude samplelogo from expand part. This looks like a limitation of SharePoint REST API for hyperlink column.

Or

If you need just URL link from samplelogo column(without other fields values) - just use this call - /_api/web/lists/getbytitle('Projects')/items?$select=samplelogo

These links might be helpfull for you:

8
  • thanks for the links, I'll go through them Dec 19, 2019 at 9:19
  • thanks for feedback. If my answer will be helpful - please mark as answer.
    – Raf
    Dec 19, 2019 at 9:31
  • Thanks Raf, the links you provided were useful.The REST call worked after I removed 'samplelogo' from the expand part.Now, my concern is to get the picture displayed on a page instead of hyperlink. Is this possible using REST call? Dec 19, 2019 at 9:33
  • Sorry, your question is not clear for me. If I understand correctly - You need to display image instead of just hyperlink? If yes - You can save hyperlink that was received by REST as workflow variable and then use this variable to set source of the picture.
    – Raf
    Dec 19, 2019 at 9:43
  • Can you please guide the steps on how to save hyperlink that was received by REST as workflow variable and then use this variable to set source of the picture Dec 20, 2019 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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