Skip to content

[Bug] Sharepoint table with whitespace and underscores fails to connect #166

@markusleh

Description

@markusleh

Describe the bug

Fetching data from Sharepoint table fails if the table name contains mix of whitespace and underscores. Possibly either whitespace or underscore is the culprit, I have not gone trough the source code.

Steps to Reproduce

  1. Add data source with `pac code add-data-source -a shared_sharepointonline -c -d -t
  2. Generation succeeds, object value in dataSourcesInfo.ts becomes table_name something something (Note the mix of undescores and whitespace)
  3. Connect to the data source in code, run npm dev, visit local site
  4. Error is generated in console:
  5. Error: Retrieve multiple records operation failure: Connection reference not found: table_name something something at ConnectorDataOperationExecutor._getConnectionReference (http://localhost:5173/node_modules/.vite/deps/chunk-LHLW5ARY.js?v=2a7c3064:2294:13) at ConnectorDataOperationExecutor._getClientsAndConnection (http://localhost:5173/node_modules/.vite/deps/chunk-LHLW5ARY.js?v=2a7c3064:2307:38) at async ConnectorDataOperationExecutor.retrieveMultipleRecordsAsync (http://localhost:5173/node_modules/.vite/deps/chunk-LHLW5ARY.js?v=2a7c3064:2046:51) at async DefaultDataOperationOrchestrator.retrieveMultipleRecordsAsync (http://localhost:5173/node_modules/.vite/deps/chunk-LHLW5ARY.js?v=2a7c3064:782:14) at async retrieveMultipleRecordsAsync (http://localhost:5173/node_modules/.vite/deps/chunk-LHLW5ARY.js?v=2a7c3064:2724:10) at async Prod_RiskProfilingAppService.getAll (http://localhost:5173/src/generated/services/Table_NameSomethingSomethingService.ts:36:20) at async fetchRecords (http://localhost:5173/src/App.tsx:14:22
    

    Manually changing the service name to table_namesomethingsomething (removing whitespace) makes the connection work

    Expected behavior

    Successfull fetching of data from Sharepoint table despite the table name

    Actual behavior

    Error in fetching Sharepoint table data

    Environment information

    • PowerAppsCodeApps Vite template, Windows 11
    • Sharepoint connection
    • Microsoft PowerPlatform CLI, Version: 1.51.1+gbfaffaa (.NET Framework 4.8.9310.0)

Metadata

Metadata

Assignees

Labels

Fix rolling outWe start the rollout with the fix for this issue.bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions