SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1k forks source link

setValue not working in Microsoft Lists #9555

Open Fedes365 opened 6 months ago

Fedes365 commented 6 months ago

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

Additional environment details

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

ghost commented 6 months ago

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

Synchh commented 6 months ago

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

tecchan1107 commented 6 months ago

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?

Synchh commented 6 months ago

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

tecchan1107 commented 6 months ago

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

Fedes365 commented 6 months ago

@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 commented 5 months ago

@tecchan1107 @Synchh

still not working.

Synchh commented 5 months ago

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

tecchan1107 commented 5 months ago

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.

Fedes365 commented 5 months ago

@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!