web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / pass a local field to ...
Power Apps
Answered

pass a local field to next screen

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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!

 

powerapps.PNG
Categories:
I have the same question (0)
  • PaulD1 Profile Picture
    2,914 on at

    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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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 😞

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    But when i try to put conEmail error occurs


    powerapps error.png

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard