cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sebgedge
Level: Powered On

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
Super User
Super User

Re: Passing Data from Gallery to a Details/Edit Screen

@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
Super User
Super User

Re: Passing Data from Gallery to a Details/Edit Screen

@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.

sebgedge
Level: Powered On

Re: Passing Data from Gallery to a Details/Edit Screen

@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 

Super User
Super User

Re: Passing Data from Gallery to a Details/Edit Screen

@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.

sebgedge
Level: Powered On

Re: Passing Data from Gallery to a Details/Edit Screen

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

Super User
Super User

Re: Passing Data from Gallery to a Details/Edit Screen

@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?

 

 

 

sebgedge
Level: Powered On

Re: Passing Data from Gallery to a Details/Edit Screen

@mdevaney  sure let me know if you need anything else 

 
 
Super User
Super User

Re: Passing Data from Gallery to a Details/Edit Screen

@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

sebgedge
Level: Powered On

Re: Passing Data from Gallery to a Details/Edit Screen

all working now many thanks! 

sebgedge
Level: Powered On

Re: Passing Data from Gallery to a Details/Edit Screen

@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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,166)