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

Passing Data from Gallery to a Details/Edit Screen

Hi, I'm building a registration app and opt not to use the wizard as I want it for a tablet but have found that Select(Parent) doesn't work for displaying records on another screen such as a details page. I also need to be able to from the details page edit the records could anyone offer any help with this?

1 ACCEPTED SOLUTION

Accepted Solutions

@sebgedge 

Your screenshot was perfect and I immediately see the issue 🙂

 

  • Delete the Edit Screen: it is not necessary!
  • Change the code to EditForm(FormViewer2)
  • Also make this change of the form reference in the Submit button

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

9 REPLIES 9
mdevaney
Super User III
Super User III

@sebgedge

#1. Create a screen called List Screen. Put your Gallery on that screen. Change the OnSelect property of the gallery to this code.

ViewForm(Form1);Navigate('Details Screen',None);

 

#2. Create another screen called Details Screen. Place an Edit Form connected to your datasource on the screen. Change the Item property to this code

Gallery1.Selected

 

#3 Put a pencil icon in the Details Screen. Change the OnSelect property to this code

EditForm(Form1)

 

#4. Create a new button showing the Text Submit. Fill in the following properties this way.  Make sure to change REFRESH to your actual datasource name.

Visible: Form1.FormMode=FormMode.Edit
OnSelect: SubmitForm(Form1); Refresh(your_datasource_name);


—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

@mdevaney Thanks for the quick response. the first part works great it's passing the data through to the details screen but when I add the edit form for the onSelect of the Pencil it's not letting me edit it, the pencil icon is in a header should it be within the display form of the details page

 

Seb 

@sebgedge 

What happens when you click the Edit button?  Does the form remain in View Mode?

 

The pencil button should be in the header.  It does not need to be in the Form.

Yes it doesn't switch to the edit for as expected

@sebgedge 

Let's take a closer look at your code.

 

Can you please share any code you have written in the OnSelect property of a Gallery or Button?

Can you please also share a screen shot showing the Form and make sure the left-side menu with the form name is showing?

 

 

 

@mdevaney  sure let me know if you need anything else 

 
 

@sebgedge 

Your screenshot was perfect and I immediately see the issue 🙂

 

  • Delete the Edit Screen: it is not necessary!
  • Change the code to EditForm(FormViewer2)
  • Also make this change of the form reference in the Submit button

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

all working now many thanks! 

@mdevaney 

I'm trying to update the record now within the data source but there's an issue with the formula im using as it's not updating

Patch(Table1,First(Filter(Table1, GUID = Gallery2.Selected.GUID)),{Title: DataCardValue6}),{First_x0020_Name:DataCardValue4},{Last_x0020_Name: DataCardValue5},{Age: DataCardValue2},{Email:DataCardValue3},{Address:DataCardValue1})

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,232)