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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populate selected valu...
Power Apps
Answered

Populate selected value in new screen on Navigation

(0) ShareShare
ReportReport
Posted on by

I am having trouble with the 3rd argument in a Navigation formula OnSelect for a Button I've added to a screen.

I am trying to create a Timesheet app using Excel in OneDrive for Business as a data source and target.  I created the app using the Employees table as the initial data source. PowerApps automatically created BrowseScreen1 which lists all Employees with NextArrow1 that users select to go to DetailScreen1. 

DetailScreen1 automatically included buttons to go back, delete or edit.  I don't want Employees to be deleted or edited in the app so I've removed those buttons.  I have added a Button which I've renamed ButtonEnterWorkTime.  This button needs to navigate to a new screen I created, named EnterWorkTime, where users will enter work time.  The Employee_Name must be passed through from DetailScreen1 based on the Employee_Name selected on BrowseScreen1.  It should then populate the Field on screen EnterWorkTime which will then write to the spreadsheet in TimeEntry.Employee_Name.  

Please advise the correct formula for the OnSelect property of ButtonEnterWorkTime.  So far I've got 

Navigate(EnterWorkTime,ScreenTransition.None) which navigates to screen EnterWorkTime and of course nothing comes across because there's no 3rd argument.  

I've tried all sorts of things to do it but I get an error message every time and the button no longer does anything. 

Please advise what I should enter in the formula after "None". 

Any suggestion is welcome and thank in advance. 

Categories:
I have the same question (0)
  • pontusofsweden Profile Picture
    255 on at

    Hi!

     

    I think the easiest way is to create a collection for the selected record when pressing ButtonEnterWorkTime. Like this: ClearCollect(SelectedEmployees;ThisItem).

    In this way, you will get all the data connected to the selected employee and you can build the next screen based on the new collection. So, the complete formula could look like this on OnSelect of ButtonEnterWorkTime:

    ClearCollect(SelectedEmployees;ThisItem);Navigate(EnterWorkTime,ScreenTransition.None) 

     

    BR

    Pontus

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @Anonymous ,

    Do you mean you want to pass the Employee_Name to Field on EnterWorkTime screen ?

    Is there a Form on EnterWorkTime screen and its data source is TimeEntry?

    If so, modify your navigate formula as below: 

     

    Navigate(EnterWorkTime,ScreenTransition.None,{Var_Employee_Name: BrowseGallery1.Selected.Employee_Name })

     

    Then, set the Defaults property of Field(TextInput): Var_Employee_Name

    Best regards,

    Sik

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard