Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ItemTemplate not working with Sharepoint Online Choice Column #86

Open
yobdoy opened this issue Sep 4, 2024 · 0 comments
Open

ItemTemplate not working with Sharepoint Online Choice Column #86

yobdoy opened this issue Sep 4, 2024 · 0 comments

Comments

@yobdoy
Copy link

yobdoy commented Sep 4, 2024

Hi @scottdurow

Thank you very much for this component, it is fantastic!

I have created a connection to a Sharepoint List. I am able to associate the PCF to the Sharepoint List and display items and group them by Status. Drag and Drop works like a charm and updates the Status via a OnDrop event.

I have discovered that when I add a choice column in the Fields chooser then no data is rendered if I try to use a custom ItemTemplate. E.g. This is the JSON response I get using the inspector. I've trimmed down the response

{
    "data": {
      "response": {
        "body": {
          "value": [
            {
              "@odata.etag": "88",
              "ItemInternalId": 1,
              "ID": 1,
              "Title": "Test",
              "Priority": {
                "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                "Id": 1,
                "Value": "High"
              },
              "Priority#Id": 1
            }
           ]
        }
      }
    }
}

I use a Priority field and then I've tried to use the following ItemTemplate the control doesn't display anything.

I've tried these combinations, and also changing the field Type from "E" to "s", as well as the FieldName in the control properties from "Priority" to "Priority.Value"

<div>{{Priority}}</div>

or

<div>{{Priority.Value}}</div>

But alas, nothing is displayed, when I remove this choice Field, or when I remove the Custom ItemTemplate, all of the fields selected are shown.

Can you please share the code needed to display SharePoint Online List Fields?

Thanks in advance and best regards,

@yobdoy yobdoy changed the title Item Template not working with Sharepoint Online ItemTemplate not working with Sharepoint Online Choice Column Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant