diff --git a/samples/sharepoint-list-update-created-by/sourcecode/Body-Sample.json b/samples/sharepoint-list-update-created-by/Body-Sample.json similarity index 100% rename from samples/sharepoint-list-update-created-by/sourcecode/Body-Sample.json rename to samples/sharepoint-list-update-created-by/Body-Sample.json diff --git a/samples/sharepoint-list-update-created-by/sourcecode/Body.json b/samples/sharepoint-list-update-created-by/Body.json similarity index 100% rename from samples/sharepoint-list-update-created-by/sourcecode/Body.json rename to samples/sharepoint-list-update-created-by/Body.json diff --git a/samples/sharepoint-list-update-created-by/README.md b/samples/sharepoint-list-update-created-by/README.md index 071280b6..81b41cae 100644 --- a/samples/sharepoint-list-update-created-by/README.md +++ b/samples/sharepoint-list-update-created-by/README.md @@ -90,8 +90,8 @@ _api/web/lists/getbytitle('List Name')/items('ID')/validateUpdateListItem ``` > [!NOTE] -> - If you've followed the exact sequence in step 5, you can use [Uri-Sample.html](sourcecode/Uri-Sample.html) without modification. -> - If you configured your own inputs in Step 5, adjust [Uri.html](sourcecode/Uri.html) as needed. +> - If you've followed the exact sequence in step 5, you can use [Uri-Sample.html](Uri-Sample.html) without modification. +> - If you configured your own inputs in Step 5, adjust [Uri.html](Uri.html) as needed. - **Body** @@ -107,8 +107,8 @@ _api/web/lists/getbytitle('List Name')/items('ID')/validateUpdateListItem ``` > [!NOTE] -> - If you've followed the exact sequence in step 5, you can use [Body-Sample.json](sourcecode/Body-Sample.json) without modification. -> - If you configured your own inputs in Step 5, adjust [Body.json](sourcecode/Body.json) as needed. +> - If you've followed the exact sequence in step 5, you can use [Body-Sample.json](Body-Sample.json) without modification. +> - If you configured your own inputs in Step 5, adjust [Body.json](Body.json) as needed. ![Step 7](assets/Step%207.jpg) diff --git a/samples/sharepoint-list-update-created-by/sourcecode/Uri-Sample.html b/samples/sharepoint-list-update-created-by/Uri-Sample.html similarity index 100% rename from samples/sharepoint-list-update-created-by/sourcecode/Uri-Sample.html rename to samples/sharepoint-list-update-created-by/Uri-Sample.html diff --git a/samples/sharepoint-list-update-created-by/sourcecode/Uri.html b/samples/sharepoint-list-update-created-by/Uri.html similarity index 100% rename from samples/sharepoint-list-update-created-by/sourcecode/Uri.html rename to samples/sharepoint-list-update-created-by/Uri.html diff --git a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1.zip b/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1.zip deleted file mode 100644 index 44377777..00000000 Binary files a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1.zip and /dev/null differ diff --git a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/[Content_Types].xml b/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/[Content_Types].xml deleted file mode 100644 index 70428b99..00000000 --- a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/[Content_Types].xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/customizations.xml b/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/customizations.xml deleted file mode 100644 index 0f2f378e..00000000 --- a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/customizations.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - /Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json - 1 - 0 - 5 - 0 - 4 - 0 - 0 - 0 - 0 - 0 - 1 - 2 - 1 - 1 - 1.0.0.0 - 1 - 0 - 1 - none - - - - - - - - - - - - - - - - - - - SharePoint UpdateCreatedBy-a701f - /providers/Microsoft.PowerApps/apis/shared_sharepointonline - 1 - 0 - 0 - 1 - - - - 1033 - - \ No newline at end of file diff --git a/samples/sharepoint-list-update-created-by/sourcecode/UpdateCreatedBy.cdsproj b/samples/sharepoint-list-update-created-by/sourcecode/UpdateCreatedBy.cdsproj new file mode 100644 index 00000000..024e1457 --- /dev/null +++ b/samples/sharepoint-list-update-created-by/sourcecode/UpdateCreatedBy.cdsproj @@ -0,0 +1,54 @@ + + + + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps + + + + + + + 8f595c70-54fd-477e-bd05-7937e1d15be0 + v4.6.2 + + net462 + PackageReference + src + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + + diff --git a/samples/sharepoint-list-update-created-by/sourcecode/src/Other/Customizations.xml b/samples/sharepoint-list-update-created-by/sourcecode/src/Other/Customizations.xml new file mode 100644 index 00000000..c56a8b50 --- /dev/null +++ b/samples/sharepoint-list-update-created-by/sourcecode/src/Other/Customizations.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + SharePoint + /providers/Microsoft.PowerApps/apis/shared_sharepointonline + Microsoft SharePoint + 1 + 0 + 0 + 1 + + + + 1033 + + \ No newline at end of file diff --git a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/solution.xml b/samples/sharepoint-list-update-created-by/sourcecode/src/Other/Solution.xml similarity index 91% rename from samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/solution.xml rename to samples/sharepoint-list-update-created-by/sourcecode/src/Other/Solution.xml index cd999e1d..87845dab 100644 --- a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/solution.xml +++ b/samples/sharepoint-list-update-created-by/sourcecode/src/Other/Solution.xml @@ -1,88 +1,89 @@ - - - UpdateCreatedBy - - - - - - - 1.0.0.1 - 0 - - GlynnPearson - - - - - - - - - glynn - 72132 - -
- 1 - 1 - - - - - - - - - - - - - - - - 1 - - - - - - - - -
-
- 2 - 1 - - - - - - - - - - - - - - - - 1 - - - - - - - - -
-
-
- - - - -
+ + + + UpdateCreatedBy + + + + + + + 1.0.0.2 + 2 + + GlynnPearson + + + + + + + + + glynn + 72132 + +
+ 1 + 1 + + + + + + + + + + + + + + + + 1 + + + + + + + + +
+
+ 2 + 1 + + + + + + + + + + + + + + + + 1 + + + + + + + + +
+
+
+ + + + +
\ No newline at end of file diff --git a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json b/samples/sharepoint-list-update-created-by/sourcecode/src/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json similarity index 85% rename from samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json rename to samples/sharepoint-list-update-created-by/sourcecode/src/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json index 36efb90d..9f45350a 100644 --- a/samples/sharepoint-list-update-created-by/solution/UpdateCreatedBy_1_0_0_1/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json +++ b/samples/sharepoint-list-update-created-by/sourcecode/src/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json @@ -1,34 +1,31 @@ { "properties": { "connectionReferences": { - "shared_sharepointonline": { - "runtimeSource": "embedded", - "connection": { - "connectionReferenceLogicalName": "glynn_sharedsharepointonline_a701f" - }, + "shared_sharepointonline-1": { "api": { "name": "shared_sharepointonline" - } + }, + "connection": { + "connectionReferenceLogicalName": "glynn_SharePoint" + }, + "runtimeSource": "invoker" } }, "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": { - "$connections": { - "defaultValue": {}, - "type": "Object" - }, "$authentication": { "defaultValue": {}, "type": "SecureObject" + }, + "$connections": { + "defaultValue": {}, + "type": "Object" } }, "triggers": { "manual": { - "metadata": { - "operationMetadataId": "470f91ea-51c2-49f7-aea7-eacb8719fced" - }, "type": "Request", "kind": "Button", "inputs": { @@ -71,50 +68,37 @@ "text_2" ] } + }, + "metadata": { + "operationMetadataId": "470f91ea-51c2-49f7-aea7-eacb8719fced" } } }, "actions": { "Send_an_HTTP_request_to_SharePoint": { - "runAfter": {}, - "metadata": { - "operationMetadataId": "f2ca745a-b93c-40f1-b189-55975d1ce485" - }, "type": "OpenApiConnection", "inputs": { - "host": { - "connectionName": "shared_sharepointonline", - "operationId": "HttpRequest", - "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline" - }, "parameters": { "dataset": "@triggerBody()['text_2']", "parameters/method": "POST", "parameters/uri": "_api/web/lists/getbytitle('@{triggerBody()['text']}')/items('@{triggerBody()['number']}')/validateUpdateListItem", "parameters/body": "{\n\t\"formValues\":[\n\t\t{\n\t\t\t\"FieldName\": \"Author\",\n\t\t\t\"FieldValue\": \"[{'Key':'i:0#.f|membership|@{triggerBody()?['text_1']}'}]\"\n\t\t}\n\t]\n}" }, - "authentication": { - "type": "Raw", - "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']" + "host": { + "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline", + "operationId": "HttpRequest", + "connectionName": "shared_sharepointonline-1" } + }, + "runAfter": {}, + "metadata": { + "operationMetadataId": "f2ca745a-b93c-40f1-b189-55975d1ce485" } }, "Respond_to_a_Power_App_or_flow": { - "runAfter": { - "Send_an_HTTP_request_to_SharePoint": [ - "Succeeded" - ] - }, - "metadata": { - "operationMetadataId": "9a81b50e-41dd-4bc9-9ec0-77dc5d06453c" - }, "type": "Response", "kind": "PowerApp", "inputs": { - "statusCode": 200, - "body": { - "status": "Complete" - }, "schema": { "type": "object", "properties": { @@ -123,11 +107,25 @@ "x-ms-dynamically-added": true, "type": "string" } - } + }, + "additionalProperties": {} + }, + "statusCode": 200, + "body": { + "status": "Complete" } + }, + "runAfter": { + "Send_an_HTTP_request_to_SharePoint": [ + "Succeeded" + ] + }, + "metadata": { + "operationMetadataId": "9a81b50e-41dd-4bc9-9ec0-77dc5d06453c" } } - } + }, + "description": "This Power Automate flow updates the “Created By” field in Microsoft Lists, replacing the default account with a specified user based on their email address, using an HTTP request to SharePoint." }, "templateName": null }, diff --git a/samples/sharepoint-list-update-created-by/sourcecode/src/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json.data.xml b/samples/sharepoint-list-update-created-by/sourcecode/src/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json.data.xml new file mode 100644 index 00000000..86d9ea9c --- /dev/null +++ b/samples/sharepoint-list-update-created-by/sourcecode/src/Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json.data.xml @@ -0,0 +1,29 @@ + + + /Workflows/UpdateCreatedBy-5704696E-AF75-EF11-A670-000D3A476E1E.json + 1 + 0 + 5 + 0 + 4 + 0 + 0 + 0 + 0 + 0 + 1 + 2 + 1 + 1 + 1.0.0.0 + 1 + 0 + 1 + none + + + + + + + \ No newline at end of file