John Bentley
John Bentley

Reputation: 1834

How do we resolve that a Power Automate Sharepoint "Create item" action has changes in the UI that aren't reflected in Code View?

Changes to target different columns in a Power Automate Sharepoint list "Create item" action aren't reflected in the Code View of the action.

Although undesirable in and of itself this can cause a related problem. When you put a flow in a solution then export/import the solution to a new environment (or do this via a Pipeline): the flow in the target environment doesn't get updated according to what you set in the flow in the source environment, through the UI.

Reproduce the UI update V Code View mismatach:

SharepointList

Flow UI changes to Create Item

      {
      "type": "OpenApiConnection",
      "inputs": {
        "parameters": {
          "dataset": "https://example.sharepoint.com/sites/MST_EXA_ExampleSite",
          "table": "some-guid",
          "item/CoolCountry": "MexicoDEV",
          "item/SubmissionDateTime": "@{utcNow()}"
        },
        "host": {
          "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline",
          "connection": "shared_sharepointonline",
          "operationId": "PostItem"
        }
      },
      "runAfter": {}
      }

Code view

Upvotes: 0

Views: 225

Answers (1)

John Bentley
John Bentley

Reputation: 1834

In a sharepoint list:

  • The "Technical name" of the column will be different from the name we see in the UI, if we rename the column. This can cause the grief above.
  • To view the "Technical Name" there are two methods:
    • (Easiest): In Sharepoint sort the column and view the column name in the url. "&sortField=TechnicalNameOfColumn"; Or
    • Cog > List settings > Click on Column name: See column name in the url as "&Field=TechnicalNameOfColumn"
  • To solve:
    • Avoid renaming a sharepoint list column if possible.
    • If renaming is necessary: Create a new column with desired name. To achieve this, this might involve:
      • copying data from old column to an intermediate column
      • deleting the old column
      • creating the new column
      • copying from the intermediate column
      • deleting the intermediate column.

Upvotes: 0

Related Questions