cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shabila97
Level: Powered On

pass a local field to next screen

Hi all,

 

I create a powerapps app that consists of 5 screen.

On Screen 1, I connect it to SharePoint List data source. User need to fill in the form in Screen 1 including their email (DataCardValue1) and will submit it.

 

User will be routed to screen 2,3,4 for several assessment.

 

If the result of assessment is success, user will click a Button on Screen 5 and email notification will be sent to the email inserted in Screen 1 (DataCardValue1).

 

My question is, how can i make DataCardValue1 from sharepoint list as a global variable so that it can be used in another screen especially in Screen 5?

 

I tried to do something like

 Navigate('Screen2', ScreenTransition.None, {Text: DataCardValue1.Text})

 but it doesnt work.

 

Your help is greatly appreciated. Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
CvdK
Level: Powered On

Re: pass a local field to next screen

That error means that the conMail variable is empty/Blank. It does not contain a value probably because you did not set its value correctly.

I would suggest using set(varEmail, DataCardValue1.Text) on the button you use to navigate to the 2nd screen before any navigate or ResetForm function.

Then use Office365.SendEmail(varEmail,"This is email subject","This is email body") in the final screen.

 

To check if the varEmail variable contains the correct value, create a (temporary) label on the final screen and set the value of the text property to varEmail. If the label displays the correct email address then the variable contains the correct value, if not then you haven't set the variable correctly.

 

View solution in original post

6 REPLIES 6
Super User
Super User

Re: pass a local field to next screen

You can make a Global Variable using the Set command - e.g.
Set(varEmail, DataCardValue1.Text)

You could add the above to the Navigate command (assume this is on a button) e.g.

Set(varEmail, DataCardValue1.Text);  Navigate('Screen2', ScreenTransition.None)

 

Alternately you could reference DataCardValue1.Text in Screen5 (you can do this even when the control is on another screen).

You could also pass the value along from screen to screen, so:

 Navigate('Screen2', ScreenTransition.None, {conEmail: DataCardValue1.Text})

Then when you navigate to Screen3

 Navigate('Screen3', ScreenTransition.None, {conEmail: conEmail})

And so on, until you get to Screen5

shabila97
Level: Powered On

Re: pass a local field to next screen

Tq paul. I've tried on above sugestion.

 

However, on Screen 5 button, I write this on OnSelect for email notification

Office365.SendEmail(conEmail.Text,"This is email subject","This is email body")

 

I am not sure what to write on "To". It is DataCardValue1.Text or conEmail.Text because both got error 😞

CvdK
Level: Powered On

Re: pass a local field to next screen

If you follow @PaulD1's' last example you should use:

Office365.SendEmail(conEmail,"This is email subject","This is email body")

Dont use conEmail.text as conEmail is not an object but a variable containing the value of DataCardValue1.Text

shabila97
Level: Powered On

Re: pass a local field to next screen

But when i try to put conEmail error occurs


powerapps error.png

CvdK
Level: Powered On

Re: pass a local field to next screen

That error means that the conMail variable is empty/Blank. It does not contain a value probably because you did not set its value correctly.

I would suggest using set(varEmail, DataCardValue1.Text) on the button you use to navigate to the 2nd screen before any navigate or ResetForm function.

Then use Office365.SendEmail(varEmail,"This is email subject","This is email body") in the final screen.

 

To check if the varEmail variable contains the correct value, create a (temporary) label on the final screen and set the value of the text property to varEmail. If the label displays the correct email address then the variable contains the correct value, if not then you haven't set the variable correctly.

 

View solution in original post

shabila97
Level: Powered On

Re: pass a local field to next screen

yes!! i got it.
thank you a lot!! really appreciate your help!!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,044)