Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

Sharepoint list update

ashwinivatsa
Level 1
Sharepoint list update

How to update a column of an existing SharePoint list item.

There are 95 list items on a SharePoint list, and a process runs to compare data from one of the columns of each list item with a database table and only update a column "Lower?" of the list items for which the values are lower than the database table values.


Operating system used: Windows

0 Kudos
1 Reply
Grixis
Level 4

Hello @ashwinivatsa 

From your short description, it seems that you want to update the "Lower" column of existing SharePoint list items where certain conditions are met (in your case, where values are lower than those in a database table), you would need to set up a scenario that includes a Python recipe or Python custom step for comparaison to interact with the SharePoint list via the SharePoint plugin and your dataset from database

I guess with a python custom step for make in first a Sync first from your existing list item in your flow and after a comparaison yith your dataset like this kind of example 

# Make your comparisons
sp_df[lower_column] = sp_df.apply(
    lambda row: "Yes" if row[sp_column_to_check] < db_df.loc[row[sp_id_column], db_column_to_check] else "No",
    axis=1
)

For resume, the scenario's process could be,

  • Retrieve Sharepoint List Items (fetch via dss plugin)
  • Retrieve your database dataset
  • Python compare  code recipe 
  • Update sharepoint list item ( as a sync conditioned by your comparaison result)

May you should test this process, especially the API update and retrieve calls, and ensure proper error handling is in place.

https://www.dataiku.com/product/plugins/sharepoint-online/

https://github.com/dataiku/dss-plugin-sharepoint-server

 

0 Kudos