cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Help me pass content or data from one screen to another.

Hi,

I am a complete newbie in power app building.

So, I am trying to build an app.

1. [screen 1] Where user will take a picture with camera, and will be able to view it on the same screen, then if they decide to save it there will be a next button to go the next screen. The capture button will also take the gps coordinates and fill out the gps coordinate field on the second screen.

2. [screen 2] Where they will have a form of sorts to fill out file name and other info and then a button to upload it to SharePoint.

Everything works on a single screen where I have all the options set up. I am using Document library to store the image and the other info.

 

My Problem here is I can't figure out how to get the data from [screen 1] =(image+gps coordinates) to [screen 2]

Is there any way to store the gps coordinates and other info directly into the picture metadata?

Any help on this matter would be great. Also suggest me how i can improve this concept.

 

TIA.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Help me pass content or data from one screen to another.

Hello Tia,  When I am passing data from one screen to another I use Set(variable, value).  So I believe on the button you use to navigate to your next screen you could do this for the OnSelect Property: 

Set(Photo, Camera.Photo);Set(Longitude, Location.Longitude); Set(Latitude, Location.Latitude); Navigate(screen_name, Cover)

This should pass all those variables to the next screen.  Then if you have a text input for say Longtitude just set its text property to Longitude and so forth.

 

Hope this works. 

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Help me pass content or data from one screen to another.

Hi @LordGrim  and welcome,

 

In PowerApps you have the concept of the global variable - function set - Set(varImage,<<Yourdata>>) 
Inside of the variable you can keep simple type of data like strings or int but also complex, records.

The next feature of Set is that it is visible across whole app, not only single screen.

Reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-set

 

You can save your image to variable and reuse it later / in next step.

 

As for the location if there is no big delay between taking picture and adding metadata on the second screen you could assign the GPS data in the second screen directly.

Yet, if you want still to save that info in Screen1 then use something similar to:

Set(varLocation,{latitude:Location.Latitude,longitude:Location.Longitude})

 

I think there is no way to embed the GPS into image directly in your solution you would need to add to SP Library location fields and then during upload of picture populate the location metadata.

 

Hope it makes sense if this is answer to your question please remember to mark it as solution so other community members can find the info quicker and maybe thumbs up (?)
If, it is not answering your question let me know, happy to help further 🙂
Regards
Dawid

 

View solution in original post

4 REPLIES 4
Highlighted
Resolver I
Resolver I

Re: Help me pass content or data from one screen to another.

Hello Tia,  When I am passing data from one screen to another I use Set(variable, value).  So I believe on the button you use to navigate to your next screen you could do this for the OnSelect Property: 

Set(Photo, Camera.Photo);Set(Longitude, Location.Longitude); Set(Latitude, Location.Latitude); Navigate(screen_name, Cover)

This should pass all those variables to the next screen.  Then if you have a text input for say Longtitude just set its text property to Longitude and so forth.

 

Hope this works. 

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Help me pass content or data from one screen to another.

Hi @LordGrim  and welcome,

 

In PowerApps you have the concept of the global variable - function set - Set(varImage,<<Yourdata>>) 
Inside of the variable you can keep simple type of data like strings or int but also complex, records.

The next feature of Set is that it is visible across whole app, not only single screen.

Reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-set

 

You can save your image to variable and reuse it later / in next step.

 

As for the location if there is no big delay between taking picture and adding metadata on the second screen you could assign the GPS data in the second screen directly.

Yet, if you want still to save that info in Screen1 then use something similar to:

Set(varLocation,{latitude:Location.Latitude,longitude:Location.Longitude})

 

I think there is no way to embed the GPS into image directly in your solution you would need to add to SP Library location fields and then during upload of picture populate the location metadata.

 

Hope it makes sense if this is answer to your question please remember to mark it as solution so other community members can find the info quicker and maybe thumbs up (?)
If, it is not answering your question let me know, happy to help further 🙂
Regards
Dawid

 

View solution in original post

Highlighted
Frequent Visitor

Re: Help me pass content or data from one screen to another.

@365CornerDawidThank You very much for your help. 😍 

Could you elaborate >>

 you would need to add to SP Library location fields and then during upload of picture populate the location metadata.

I have a column in document library named 'GPS Coordinate' where the GPS coordinates gets stored, But in picture metadata nothing is there.

 

test 01.PNG

 

Highlighted
Frequent Visitor

Re: Help me pass content or data from one screen to another.


@rmanthey wrote:

Hello Tia,  When I am passing data from one screen to another I use Set(variable, value).  So I believe on the button you use to navigate to your next screen you could do this for the OnSelect Property: 

 

 

Set(Photo, Camera.Photo);Set(Longitude, Location.Longitude); Set(Latitude, Location.Latitude); Navigate(screen_name, Cover)

 

 

This should pass all those variables to the next screen.  Then if you have a text input for say Longtitude just set its text property to Longitude and so forth.

 

Hope this works. 


@rmanthey  Thank You very much for your help. 😍 It worked like a charm. 🍀

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,376)