powercat-creator-kit icon indicating copy to clipboard operation
powercat-creator-kit copied to clipboard

[BUG]: Sharepoint Choice column renders as @odata instead of value after filtering

Open daniel-alifano opened this issue 1 year ago • 3 comments

Describe the bug Sharepoint backend, choice column renders as picture attached. Choices seems to work just fine. Item property is a filtered sharepoint datasource

To Reproduce

  1. Filter share point list like: SortByColumns(Filter( Commercial, TextInput1_5.Text in 'Request ID' ),ctxSortColCOM,If(ctxSortAscCOM,SortOrder.Ascending,SortOrder.Descending))

  2. Choice columns dont correctly show

image

Seems the issue is when the list is filtered it incorrectly works. without a filter, just having the datasource in items: image

AB#1006

daniel-alifano avatar Aug 08 '22 06:08 daniel-alifano

Hello everyone. I have the same problem but to me this is happening after the SortByColumns formula has been applied, not the filtering. The following formula works well without the SortByColumns.

Items: Filter( SharePointListName, StartsWith( Title, txtSeachDataView.Text ) )

DavesTechTips avatar Aug 15 '22 13:08 DavesTechTips

The same here when i change the Items-Property of the BasicList from SharePoint-Datasource to a Collection-Variable. No Values, instead get OData-Queries. For People Picker i always get OData-Objects...

schneika avatar Sep 14 '22 14:09 schneika

Hi @daniel-alifano @schneika @DavesTechTips I think the reason for these kinds of issues is that once a datasource is changed to be a collection rather than a direct connection datasource (this happens when you use Filter) some of the built-in formatting is lost.

To work around this perhaps you could try the technique I describe here - https://github.com/microsoft/powercat-creator-kit/issues/111#issuecomment-1248417388

I think it would be good to have the DetailsList automatically detect these kinds of columns and output the display name rather than the raw object. It is somewhat related to https://github.com/microsoft/powercat-code-components/issues/7.

Would that work for you? Thanks for helping with the Creator Kit!

scottdurow avatar Sep 15 '22 17:09 scottdurow