cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Responsive Resident
Responsive Resident

Pass Variable to Anothe App Using Launch()

I'm trying to pass a variable from app1 to app2. In both apps the variable is the same: Variable.ID. The app should open on the ResourceScreen in App2. What am I doing wrong?

 

The below is the OnSelect for an icon:

Launch( "/providers/Microsoft.PowerApps/apps/xxxxxxxx-xxxx-9999-9999-ljdflkjsdflkjlj",
{ Navigate: "ResourceScreen" , Variable.ID: "varRecord.ID" }
)

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @TesDA ,

Based on the formula that you mentioned, I think there is something wrong with the Variable.ID variable name and the value you assigned to the variable name. Please consider remove the dot (.) inside the variable name. Please modify your formula as below:

Launch(
       "/providers/Microsoft.PowerApps/apps/xxxxxxxx-xxxx-9999-9999-ljdflkjsdflkjlj",
       {VariableID: varRecord.ID},
       LaunchTarget.New
)

Note: I assume that the varRecord is a Record value in your source app (App1), and you want to pass the ID column value under the varRecord to your App 2. It is not necessary to pass the Navigate variable from your App 1 to your App 2.

 

Within your App2, set the OnStart property of App to following:

Set(ItemID, Param("VariableID"));
If(
    !IsBlank(ItemID),
    Navigate(ResourceScreen)
)

then within the ResourceScreen, you could reference the passed VariableID value through the ItemID variable directly.

 

Please try above solution, check if the issue is solved.

 

Regards,

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

View solution in original post

2 REPLIES 2
KrishnaV
Super User
Super User

Hi @TesDA ,

 

try this:

Launch( "/providers/Microsoft.PowerApps/apps/xxxxxxxx-xxxx-9999-9999-ljdflkjsdflkjlj&VariableID="&varRecord.ID)

on the app read the values as 

Param( VariableID)

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
v-xida-msft
Community Support
Community Support

Hi @TesDA ,

Based on the formula that you mentioned, I think there is something wrong with the Variable.ID variable name and the value you assigned to the variable name. Please consider remove the dot (.) inside the variable name. Please modify your formula as below:

Launch(
       "/providers/Microsoft.PowerApps/apps/xxxxxxxx-xxxx-9999-9999-ljdflkjsdflkjlj",
       {VariableID: varRecord.ID},
       LaunchTarget.New
)

Note: I assume that the varRecord is a Record value in your source app (App1), and you want to pass the ID column value under the varRecord to your App 2. It is not necessary to pass the Navigate variable from your App 1 to your App 2.

 

Within your App2, set the OnStart property of App to following:

Set(ItemID, Param("VariableID"));
If(
    !IsBlank(ItemID),
    Navigate(ResourceScreen)
)

then within the ResourceScreen, you could reference the passed VariableID value through the ItemID variable directly.

 

Please try above solution, check if the issue is solved.

 

Regards,

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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,118)