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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Assign a DataCardValue...
Power Apps
Unanswered

Assign a DataCardValue to a global Variable and Use it with a Button to Navigate to another screen

(0) ShareShare
ReportReport
Posted on by 4
Hello
 
Thanks in adcance for your help
 
I have a screen1 containing A gallery and on select it display and edit form with the content of a sharepoint list. This part works very fine 
 
On of the DataCard contain the value of the next screen i would like to navigate (for example Screen_Next)
 
I added a button and on the Screen1 and set a global variable : Set(Gbl_Next_Screen, DataCard1.Default) and the Gbl_Next_Screen is set as Screen_Next when I run the program
 
When I want to use it with the navigate funtion : Navigate(Gbl_Next_Screen) I have an error : The first argument of Navigate should be a control or Screen 
 
Can I have help on this ?
 
Thanks a lot
 
 
 
PART 2
 
 
 
Hello
 
Thanks your answer !
 
The text is coming from a Sahepoint List 
 
this is the test I did 
In my On Select function of my button from Screen1 
Set(Gbl_Next_Page, Next_Page); Navigate(Gbl_Next_Page)
Next_Page is the name on my targeted screen
This is working fine 
 
In my field called Link from my Sharepoint List I have entered Next_Page
I did those test 
 
Set(Gbl_Next_Page, DataCardValue33.Text)
 
 
The Global variable received the Value Next_Screen as text 

but when I'm tryting to use it with the Navigate function I have the error (The first argument of Navigate should be a control or Screen)
Set(Gbl_Next_Page, DataCardValue33.Text); Navigate(Gbl_Next_Page)
 
I also tried to 
Set(Gbl_Next_Screen, RACI_Link_Txt_DataCard1.Default);Navigate(Gbl_Next_Screen)
With the same result
 
I'm able to transform a text string into a control ?
 
Thanks for your help !
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at
    Assign a DataCardValue to a global Variable and Use it with a Button to Navigate to another screen
     
    Sounds like the default is entred as a string "Next_Screen". 
    Does it take this value automatically from your datasource or is it hard coded? 
    If it take sit from a datasource it will always be seen as a string and not as a controll. You could make use of a Switch function to get it working. 
    But the function could be quite long.
     
    Let us know a bit more about your use case so we can give  you the best advice possible. 
     
    If this solvede your porblem please accept it as solution so others can find it as well. 
    If it helped in any other way consider liking it so we can keep supporting eachother. 
  • SV-01121732-0 Profile Picture
    4 on at
    Assign a DataCardValue to a global Variable and Use it with a Button to Navigate to another screen
     
    Hello
     
    Thanks your answer !
     
    The text is coming from a Sahepoint List 
     
    this is the test I did 
    In my On Select function of my button from Screen1 
    Set(Gbl_Next_Page, Next_Page); Navigate(Gbl_Next_Page)
    Next_Page is the name on my targeted screen
    This is working fine 
     
    In my field called Link from my Sharepoint List I have entered Next_Page
    I did those test 
     
    Set(Gbl_Next_Page, DataCardValue33.Text)
     
     
    The Global variable received the Value Next_Screen as text 

    but when I'm tryting to use it with the Navigate function I have the error (The first argument of Navigate should be a control or Screen)
    Set(Gbl_Next_Page, DataCardValue33.Text); Navigate(Gbl_Next_Page)
     
    I also tried to 
    Set(Gbl_Next_Screen, RACI_Link_Txt_DataCard1.Default);Navigate(Gbl_Next_Screen)
    With the same result
     
    I'm able to transform a text string into a control ?
     
    Thanks for 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard