sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

setValue not working in Microsoft Lists

Open Fedes365 opened this issue 1 year ago β€’ 14 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] πŸ’₯ Internet Explorer
  • [ ] πŸ’₯ Microsoft Edge
  • [X] πŸ’₯ Google Chrome
  • [ ] πŸ’₯ FireFox
  • [ ] πŸ’₯ Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version: Chrome 122.0.6261.95 (Official build) (64 bit)

Describe the bug / error

setValue and all related capabilities are completely ignored in Microsoft Lists (browser version).

Conversely, in SharePoint user interface and Microsoft Lists PWA (Progressive Web App) everything works fine.

You can read about this bug also here in Microsoft 365 PnP Repository, where a user reported that setValue was not working anymore as expected.

Steps to reproduce

  1. Create a new list
  2. Open it through Microsoft List hub or add "?env=WebViewList" at the end of the URL
  3. Add a Person type column
  4. Add a new item
  5. Apply a JSON column formatting to the person column created before. You can use this sample stored in Microsoft Official Repository on GitHub, to react and display users who have reacted to a specific item: https://raw.githubusercontent.com/pnp/List-Formatting/master/column-samples/multi-person-reaction/multi-person-reaction.json
  6. setValue will not work as expected, being completely ignored by Microsoft Lists (browser version).

Expected behavior

setValue should be recognized in Microsoft Lists so that "formatters can render action buttons which modify the item internally without opening editors or forms" as explained in Microsoft Learn website here: https://learn.microsoft.com/sharepoint/dev/declarative-customization/formatting-advanced#set-multiple-field-values-of-an-item-using-customrowaction

Here is a gif animation of the expected behaviour:

setValue behaviour

Fedes365 avatar Mar 04 '24 12:03 Fedes365

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Mar 04 '24 12:03 ghost

Just want to add that the error also occurs in Sharepoint for all users in our company (using both chrome and edge). See the attached video from our SharePoint environment.

Note one thing: If "the multi-person reaction" already contained several registered people before the update, then one person can click several times in the cell and remove all registrations so that in the end it says "0" people. After that, nothing happens when you click in the cell, as the attached video shows.

https://app.screencast.com/x7WoNUzQqX8VJ

Synchh avatar Mar 06 '24 11:03 Synchh

Hi @Fedes365 @Synchh . I saw a report on Twitter that the bug has been fixed. If you have time, could you please check it out?

tecchan1107 avatar Mar 18 '24 06:03 tecchan1107

Hi @Fedes365 @Synchh . I saw a report on Twitter that the bug has been fixed. If you have time, could you please check it out?

Hello

Unfortunately, it is not.

Lists converted to "new" lists still have the problem, as shown in the attached image. You can tell the difference between "new" lists and "old" lists based on standardized icons that come as part of the tab on new lists.

Old lists (without icon) work fine. I don't quite remember if old lists had the problem earlier when I first reported this and that these have now been fixed. But in all cases the problem occurs when the lists are converted to the new type of lists with an icon.

Lists

Synchh avatar Mar 18 '24 07:03 Synchh

Thanks for checking @Synchh πŸ™!! Hmmm... I hope it gets fixed soon.... (And the new List is still not deployed in my environment... no icons are showing up) image

tecchan1107 avatar Mar 18 '24 07:03 tecchan1107

@tecchan1107 Thanks! I've read that Twitter post just because you informed me about it πŸ˜… I don't use Twitter often anymore, anyway I will test your sample again as soon as possible πŸ‘

Fedes365 avatar Mar 18 '24 10:03 Fedes365

@tecchan1107 @Synchh

still not working.

Fedes365 avatar Mar 18 '24 15:03 Fedes365

Hi @Fedes365 and @tecchan1107, it looks like it's working again. Can you confirm ?

Synchh avatar Apr 02 '24 07:04 Synchh

Nice! Thanks for letting me know! It worked fine in my environment! However, it is still an old list (?) in my environmentπŸ˜… The icons are not displayed in the columns.

tecchan1107 avatar Apr 02 '24 23:04 tecchan1107

@tecchan1107 and @Synchh

I confirm that it works in Microsoft Lists (browser) now.

I'll wait for a sp-dev-docs maintainer/responsible to consider this bug as officially solved and close it. In the meanwhile, I think it can stay open as a reference, in case any other user shall report problems about setValue.

Thanks for your contribution!

Fedes365 avatar Apr 10 '24 12:04 Fedes365