cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

OnStart in Embedded Canvas App

Hi,

 

I'm learning Power Apps and working on some test scenarios.  One of which is I have an embedded canvas app that I'd like to enable to work on its own.  That is, I'd like the same app to function while embedded or while running as a standalone app.  The canvas app is a simple app that modifies a record.  

 

To facilitate this I added a screen that would display if the app isn't embedded.  That screen simply asks for user input for the record identifier.  User submits the record identifier and the app will continue as normal.  If the app is embedded in a model-driven form, the record identifier is passed by the parent form and the user input screen should be bypassed.

 

To facilitate this, I set a flag variable "_IsEmbedded" in the app's OnStart action.  

 

If(
    !IsBlank([@ModelDrivenFormIntegration].Item),
    Set(
        _IsEmbedded,
        true
    ),
    Set(
        _IsEmbedded,
        false
    )
);
If(
    _IsEmbedded,
    Navigate(
        HomeScreen,
        ScreenTransition.None
    ),
    Navigate(
        WelcomeScreen,
        ScreenTransition.None
    )
);

If _IsEmbedded = true then navigate to the Home Screen.  If _IsEmbedded = false, navigate to the Welcome Screen where the user is required to enter the record identifier.

 

Unfortunately, this doesn't seem to be working!  When running the app as an embedded app in the model-driven app, the record identifier is successfully passed.  I can display record values.  However, _IsEmbedded remains false.  So, I am always pointed to the Welcome Screen.

 

Am I missing something simple?  Or, is this capability not supported?  

 

Thanks for any help.

 

Regards,

Dan

1 REPLY 1
Highlighted
Microsoft
Microsoft

Re: OnStart in Embedded Canvas App

Hi,

 

I've never seen someone try to detect if the app is being ran either when it is embedded or on the web. After talking with some people, we aren't certain that this is possible. This might be a better question to bring to Microsoft Support. I'll include a link below if you would like to go down that route. Otherwise if any other communities members might know or have implemented something like this before feel free to chime in.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,673)