0

I have a SharePoint list content type made in legacy SharePoint. There are 143 calculated fields in this list. Is there a way to extract a complete list of all the calculations in all the columns at once so that I do not have to pull them down manually from each individual column settings?

Thank youColumn Settings

Column List

enter image description here

1 Answer 1

1

There is a way to do it using Google Chrome or any other Chromium-based browser.

  • Navigate to a SharePoint site
  • Open Browser's dev tools (usually by clicking F12)
  • Open Console tab
  • Paste the following code into the console
(async () => {

  const payload = {
    method: 'GET',
    headers: { "Accept": "application/json; odata=verbose" }
  }

  let results = await fetch("https://YOUR_SITE_URL.sharepoint.com/sites/YOUR_SITE/_api/web/lists/getByTitle('YOUR_LIST_TITLE')/fields", payload)
  let data = await results.json();
  let fields = data.d.results.filter(field => field.TypeAsString === "Calculated").map(field => {
    return {
      internalName: field.InternalName,
      Title: field.Title,
      Formula: field.Formula
    }
  })

  console.table(fields);

  })().catch(console.log)


  • Replace YOUR_LIST_TITLE,YOUR_SITE and YOUR_LIST_TITLE accordingly.
  • Run the code by pressing CTRL+ENTER
  • Review the table that lists all your calculated columns

enter image description here

1
  • Thank you so much @Denis Molotstov, your solution worked perfectly! Commented Mar 17, 2022 at 19:05

Your Answer

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

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