Skip to main content

Notifications

Power Apps - Power Apps Experimental Features
Suggested answer

Configure Properties of Screen Views and Forms; Format of Link to each screen

Posted on 21 Nov 2024 05:40:56 by 10
I have a Sharepoint List. I customized the form by clicking Integrate > Power Apps > Customize Form


Now, in Power Apps studio, I have 3 screens:
FormScreen_New with New form
Screen_Edit with Edit form
Screen_View with View form.

1. What should be the format of the link so that when the user clicks the link in the approval notification, it will direct them to the right screen view and form?
Is this not correct? https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen={Screen name}&ItemID={ID}

2. How should I configure each screen and form in such a way that when I click the link, it will work?


I want to achieve how infopath forms behave like in this format:

https://<yourtenant>.sharepoint.com/sites/<yoursite>/Lists/<List Name>/Item/newifs.aspx?ID=<ID>&DefaultView={view name}
https://<yourtenant>.sharepoint.com/sites/<yoursite>/Lists/<List Name>/Item/editifs.aspx?ID=<ID>&DefaultView={view name}
https://<yourtenant>.sharepoint.com/sites/<yoursite>/Lists/<List Name>/Item/displayifs.aspx?ID=<ID>&DefaultView={view name}
  • Suggested answer
    SaiRT14 Profile Picture
    SaiRT14 911 on 26 Nov 2024 at 00:58:10
    Configure Properties of Screen Views and Forms; Format of Link to each screen
    pls try the following:
     
    You need to pass parameters to identify the target screen and the specific item ID. https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen={Screen Name}&ItemID={ID}
     
    New Item - https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen=FormScreen_New
    Edit Item - https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen=Screen_Edit&ItemID=123
    View Item - https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen=Screen_View&ItemID=123
     
    In the app's OnStart property, capture the parameters from the URL:
    Set(ScreenParameter, Param("screen")); // Captures the screen name
    Set(ItemIDParameter, Value(Param("ItemID"))); // Captures the item ID (if provided)
     
    On each screen (FormScreen_New, Screen_Edit, Screen_View), use the OnVisible property to configure the form behavior:
    New Screen (FormScreen_New): - If(ScreenParameter = "FormScreen_New", NewForm(YourFormName));
    Edit Screen (Screen_Edit): If(
        ScreenParameter = "Screen_Edit" && !IsBlank(ItemIDParameter),
        EditForm(YourFormName);
        YourFormName.Item = LookUp(YourDataSource, ID = ItemIDParameter)
    );
    View Screen (Screen_View): If(
        ScreenParameter = "Screen_View" && !IsBlank(ItemIDParameter),
        ViewForm(YourFormName);
        YourFormName.Item = LookUp(YourDataSource, ID = ItemIDParameter)
    );
     
    When generating approval notifications, include dynamic links with the appropriate parameters:
    For New items - https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen=FormScreen_New
    For Edit items - https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen=Screen_Edit&ItemID={ID}
    For View items - https://apps.powerapps.com/play/{App ID}?tenantId={Tenant ID}&screen=Screen_View&ItemID={ID}
     
    let me know if you need more details. thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,129

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,797

Leaderboard

Featured topics