cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Accessing Sharepoint List

roland-daane
Deputy Chef II
Deputy Chef II

Hi,

I'm looking what you need to do to lookup values in a Sharepoint list, and et them into variables for a recipe.

I can search the list, and see the values in the Job, but I can't seem to access them.




11 REPLIES 11

Hi,

I pasted this into the response body:

{

"name": "project",

"type": "string",

"optional": true,

"label": "Project",

"control_type": "text"

}


But I'm still not ableto pick up the value from the sharepoint list into a variable



vinny-sosa
Deputy Chef I
Deputy Chef I
You canโ€™t just ass a list to a variable. The connector brings back a list. What is it that you want to do with the list? If you want to add it to a Google sheet you can do that straight away with the Google sheet connectorโ€ฆ for example. If you want to look for a specific person use the repeat action on the list until you find the person(s) that meet(s) your criteriaโ€ฆ say create date time stamp is less than 5 minutes ago or something. Then do something with each of those people (I.e.) maybe add them to another system or send them and email or something. 

--

I want to compare it with the part in the filename to valicate if the filename is correct.


Say filename is BC12324-XX-YY-Z-BQ-A-001 the BC1234 is project.


In the Sharepoint list I want to pick up the Project, and if Projectcode from filename exists in projectcode from Sharpeoint, then it's okay.


You would repeat through the share point list and compare each value in the list to the name of the file using โ€˜ifโ€™ and โ€˜containsโ€™. You can also do this comparison using a logger step with a function in it whose output is a true or false. In either case you need a repeat step to loop through the items of the array. 

--

sanjay-rathod1
Deputy Chef I
Deputy Chef I

Roland, the fields you have set up in the response body are not matched with the API response.

Copy the JSON by clicking on the "Copy JSON" button of the following screen:



After copying JSON, go to the Custom Action.

Clear the Response body you have setup.

Then click to "Use JSON" from Response Body field.

Popup will appear.

Remove the Empty Brackets from "JSON Sample" area.

Paste the JSON here

Click to next > Then Click to "Generate Schema"

------

By following these steps, you will get the API response variables to the next steps, and use it further for comparision.

P.S. If your response may contain an array of data, then you also need to do a Loop (Repeat action) to walk through each record.