sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

List Formatting - customRowAction > embed integration with Powerapps that receive parameters fail

Open aaclage opened this issue 1 year ago • 7 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [X] 💥 Microsoft Edge
  • [X] 💥 Google Chrome
  • [X] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

I use List formatting with customRowAction > embed that open Microsoft PowerApps, this PowerApps is expecting 2 parameter values that is send in url used in List formatting. When url is sent PowerApp cannot read second paramater, I assume that 2 parameter is not being sent from List formatting even it's defined in "src", below test case used that didn't retrieve info.

PowerAppDialog

Steps to reproduce

  1. Create Power App and define "OnStart" the following expected parameters to receive in Power App and include in variables
Set(testColor,Param("testColor"));
Set(tenantId,Param("tenantId"));
  1. Include in textbox to display variables
  2. When open Powerapp with parameter "?tenantId=[TenantId]&testColor=RED" Parameters values should display in PowerApp.
  3. Create Support List
  4. Create Field where Color should be included (sample "Red")
  5. Format Column with following formatting:
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "embed",
    "actionInput": {
      "src": "https://apps.powerapps.com/play/e/[Enviroment]/a/[AppId]?tenantId=[tenantId]&testColor=Red",
      "height": "350",
      "width": "700"
    }
  },
  "txtContent": "Click here to open PowerApp 👩‍🍳"
}

PowerAppDialog

Expected behavior

It's expected when used "action": "embed" and src can send url with multiple dynamic parameter values and then powerapps receive all url parameters and display in PowerApps.

aaclage avatar Sep 23 '24 08:09 aaclage

@tpodugu-ms, @arkogupta, @jgupta-msft for your consideration this new issue with Powerapps integration and list Formatting url parameters.

aaclage avatar Sep 23 '24 08:09 aaclage

Thanks @aaclage. We will provide an update on this soon

tpodugu-ms avatar Sep 23 '24 11:09 tpodugu-ms

@aaclage Could you please also add the detailed steps of creating the powerApp? That'd be really helpful, thanks!

arkogupta avatar Oct 03 '24 16:10 arkogupta

@arkogupta as requested below step by step description:

Create Sample Power App:

  1. Access to https://make.powerapps.com/
  2. Left Menu > Click "Create"
  3. Blank app Click
  4. Select "Blank canvas app"
  5. Provide App Name "Parameter"
  6. On Left Menu Tree View > Select Object "App"
  7. Select Property "OnStart"
  8. Include following lines to store parameters:
Set(testColor,Param("testColor"));
Set(tenantId,Param("tenantId"));

image 9. include 4 new "Text label" 10. in this new "Text label" add 2 labels with text "Parameter 'testColor'" and "Parameter 'tenantid'" 11. Include 2 label with variables: "testColor" and "tenantId" defined before 12. Access top right icon and "Publish".

Validate New App

  1. Access to https://make.powerapps.com/
  2. Access to Left Menu "Apps"
  3. Access to "Parameter" App and click 3 dots icon > details
  4. Copy "Web link" with default url to access App, (tenantId is already included) and include new Parameter "&testColor=Red" on url
  5. Open new Tab and paste url, this should display both parameters.

Include List formatting on Column

  1. Create New List
  2. Access to View
  3. Edit Title > Column Settings > Format this column > include following json (replace "src" with copied url described before)
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "embed",
    "actionInput": {
      "src": "https://apps.powerapps.com/play/e/[Enviroment]/a/[AppId]?tenantId=[tenantId]&testColor=Red",
      "height": "350",
      "width": "700"
    }
  },
  "txtContent": "Click here to open PowerApp 👩‍🍳"
}

Everything combined display sample provided in gif: image

aaclage avatar Oct 06 '24 14:10 aaclage

Thanks @aaclage for the detailed repro steps. I am able to repro now. Will get back with an update soon.

arkogupta avatar Oct 07 '24 14:10 arkogupta

@aaclage : Thanks for reporting the issue. It has been fixed and should reach to prod in 2-3 weeks.

jgupta-msft avatar Oct 09 '24 15:10 jgupta-msft

@jgupta-msft Thank you for the update, I will wait and test in 3 weeks and close when validated.

Again Thank you for your support on this topic.

aaclage avatar Oct 09 '24 15:10 aaclage

Dear @arkogupta,@jgupta-msft,

Tested and is working as expected, thank you very much for your support on this topic. 🙂

aaclage avatar Oct 31 '24 09:10 aaclage

Hi @aaclage ,

I know this issue is already closed. But would like to check if the link in the "src" is accepting dynamic parameters? I tried passing value from another column from the list using this:

"src": "https://apps.powerapps.com/play/e/[Enviroment]/a/[AppId]?tenantId=[tenantId]&testValue='+[$MyColumn]"

but it passes blank value to my PowerApps. I tested the value of [$MyColumn] and it has indeed value, just not working if being passed into the src link.

Thanks. :)

aikosherina avatar Dec 12 '25 01:12 aikosherina