cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Edit button from browse gallery doesn't pass data to edit form

In my timesheet app, I have BrowseGallery2 which displays all time entries (data in TimeEntry excel table). I've added a button to take me back to the EnterWorkTime screen to edit the data in EditForm4. 

The Onselect formula for the edit button is currently:

EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None)

I thought I'd put in another argument after the screen transition like TimeEntry.ThisItem to bring the data from the selected BrowseGallery2 but it doesn't like it. 

Suggestions appreciated. Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @spow5666 ,

Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the button in the BrowseGallery2 to following:

EditForm(EditForm1);
Navigate(EditScreen1)

 

Set the OnSelect property of the ButtonEnterWorkTime to following:

NewForm(EditForm1); // Modify formula here. Make your Editform1 in New Mode
Navigate(EditScreen1)

 

Set the Item property of the Edit form (EditForm1) to following:

If(
   EditForm1.Mode = FormMode.New,
   Defaults(TimeEntry),
   BrowseGallery2.Selected
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Resolver II
Resolver II

You would have to do it like this. EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None, {varTimeEntry: ThisItem.TimeEntry})

 

 

------------------------------------------------------------------------------OfficePowerUser.com------------------------------------------------------------------------ 
If this post helps answer your question, please click on “Accept as Solution” to help other members. If you thought this post was helpful, please give it a Thumbs Up. 

Anonymous
Not applicable

Hey @spow5666 ,

 

I might be misunderstanding your question, but if it is what I think it is, you may just need to adjust the 'Item' field on your form.

 

Change the 'Item' field on your form to BrowseGallery2.Selected  and the form should start pulling the info you selected.

 

Hope that helps!

@Anonymous thanks for your suggestion.

That works when navigating from BrowseGallery2 to edit an existing TimeEntry record, however, when I navigate to EditForm1 from a ButtonEnterWorkTime on DetailScreen1 which is used to create a new TimeEntry record, the screen is populated with the record previously navigated from BrowseGallery2. 

How do I then instruct the Item property on EditForm1 to use Defaults(TimeEntry) when navigating from ButtonEnterWorkTime on DetailScreen1 or use BrowseGallery2.Selected  when navigating from BrowseGallery2?

 

 

Advocate II
Advocate II

Ok so what ever you do, dont parse a variable using the navigate function. It will make your app super slow to switch pages. Better to add a global variable to the top of the code like Set(gblTimeEntry, timeentry.selected) as it will be much faster.

Hi @spow5666 ,

Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the button in the BrowseGallery2 to following:

EditForm(EditForm1);
Navigate(EditScreen1)

 

Set the OnSelect property of the ButtonEnterWorkTime to following:

NewForm(EditForm1); // Modify formula here. Make your Editform1 in New Mode
Navigate(EditScreen1)

 

Set the Item property of the Edit form (EditForm1) to following:

If(
   EditForm1.Mode = FormMode.New,
   Defaults(TimeEntry),
   BrowseGallery2.Selected
)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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 (7,283)