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

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
Anonymous
Not applicable

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

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

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 😞

Anonymous
Not applicable

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

But when i try to put conEmail error occurs


powerapps error.png

Anonymous
Not applicable

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

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

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,483)