-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
List grouping by spfx computed column does not work - always group as not set #9668
Comments
Hi @CarlVerret, could you provide information about the calculated column and view grouping setting? I have checked it on my side and I can see the correct grouping label for a calculated column. |
Hi Micha艂, In fact I had to use a custom spfx field to compare if, under some circumstances two dates were equal or not, returning a simple Yes or No text value. public onRenderCell(event: IFieldCustomizerCellEventParameters): void {
if ( ... ) // ... under some condition, set value to blank
} The display works perfectly in list's columns. But grouping by this column result in only "Non affect茅" (not set in french) values. Even if the cell render produces values. |
@CarlVerret Unfortunately, it will not work like this. The SPFx field customizer does not change the value of a field; it just overrides the rendering of the column field. Maybe you can try using a calculated column formula instead. Try comparing both dates with conditional formulas: If there are additional conditions, such as comparing both dates when the status of the items is 'Approved,' then simply add a nested IF statement. |
The main reason we opted for a custom field is that there's no easy way to compare two dates natively with calculated columns. If there's one, we could figure it out ! This is something that is asked a lot about in many forums. |
I've reviewed the calculated column formula where I check the value of the Status column and compare the Modified date with my Approval DateTime column. Of course, use ';' or ',' depending on the language on the site.
The effect is like this. Of course, your case may be more complicated, and as you mentioned then other solutions may need to be considered. |
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
馃挜 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Issue description
Having a custom spfx computed column in a list (wich displays true or false depending if two other fields are equal), when we select "Group by this column", the only group that is displayed is "Not set" (Non appliqu茅 in french)
The text was updated successfully, but these errors were encountered: