Skip to content

Changes made by setValue don't sync in other users view #9758

Description

@marcokitzmann

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
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • Chrome 125.0.6422.142
  • Edge 125.0.2535.92
  • Firefox 124.0

Describe the bug / error

We use a button with setValue to add a person and set a new status to an item with a single click in list view. However, during testing we realised that changes made by setValue action do not sync in other editors views. This leads to problems because the button may be clicked again by other editors and tasks may be worked on by several people.

setValueBug.webm

Steps to reproduce

  1. Add a JSON format to a person field that gives it a button with a customRowAction of type setValue. i.e.

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "div",
"style": {
"display": "=if(([$Status] == 'To Do' || [$Status] == '' || [$Status] == 'Watch' || [$Status] == 'Idee') && [$Autor] == '', 'flex','none')",
"flex-direction": "row"
},
"children": [
{
"elmType": "div",
"style": {
"width": "95px",
"height": "26px",
"border-radius": "3px",
"cursor": "pointer",
"display": "flex",
"align-items": "center",
"justify-content": "space-evenly",
"margin": "5px"
},
"attributes": {
"class": "ms-bgColor-themePrimary ms-bgColor-themeDark--hover ms-fontColor-white ms-fontSize-12 ms-fontWeight-bold"
},
"customRowAction": {
"action": "setValue",
"actionInput": {
"Status": "In Arbeit",
"Autor": "Ivan (@me)"
}
},
"children": [
{
"elmType": "div",
"txtContent": "Übernehmen"
}
]
}
]
},
{
"elmType": "div",
"children": [
{
"elmType": "span",
"txtContent": "=join(@currentField.title, ', ')",
"style": {
"padding-left": "5px",
"word-break": "keep-all"
}
}
]
}
]
}

  1. Use the button and observe in a second browser whether the changes are visible.

Expected behavior

A click on the button in list view should trigger the change of the values and these changes should be immediately visible to other users.

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.Needs: Triage 🔍Awaiting categorization and initial review.sharepoint-developer-supportsharepoint-developer-supporttype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions