Pnpjs: Folder default values at library just working for first default value

Created on 11 Nov 2020  路  2Comments  路  Source: pnp/pnpjs

Folder with some default values are not coming using the method sp.web.getFolderByServerRelativePath("/sites/dev/DefaultColumnValues/fld_GHk5").getDefaultColumnValues(); .I think that the issue is with the regular expression in the column-defaults/list.ts file in the function getDefaultColumnValues which is called from the folders class.

Category

  • [ ] Enhancement
  • [x] Bug
  • [ ] Question
  • [ ] Documentation gap/issue

Version

2.0.11
Please specify what version of the library you are using: [ 2.0.6 ]

Please specify what version(s) of SharePoint you are targeting: [ SP Online ]

If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.

Expected / Desired Behavior / Question

The expected behaviour is to get all default values at folder level when using getDefaultColumnValues() function

Observed Behavior

It is getting just the first default value at folder level.

Steps to Reproduce

Create a folder with some default values and pass the folder to the function sp.web.getFolderByServerRelativePath("/sites/dev/DefaultColumnValues/fld_GHk5").getDefaultColumnValues() to check the default value

code fixed bug

Most helpful comment

yea its a bug, PR soon in, thanks for reporting.

All 2 comments

yea its a bug, PR soon in, thanks for reporting.

What happens when retrieving values from a folder that has some default values inherited from a parent folder?

Was this page helpful?
0 / 5 - 0 ratings