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 III
Super User III

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
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (88,595)