cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Form not showing values selected in Gallery

My form isn't showing the values that were selected in the gallery:

 

Gallery- Gallery_Main

NextArrow1 OnSelect:  Set(varFormMode,"edit"); Set(varRecord,ThisItem); ResetForm(Form1); Navigate(scrForm1,ScreenTransition.None)

 

Form1:

OnSuccess: Set(varRecord,Form1.LastSubmit);Navigate(scrForm2_EQRAttach,ScreenTransition.None)

DefaultMode: If(varFormMode="edit",FormMode.Edit,varFormMode="view",FormMode.View,FormMode.New)

Item: varRecord

 

OppAccount_DataCard2

Default: ThisItem.OppAccount

Update: OppAccount_DataCardValue.Selected.Result

Dropdown -

OppAccount_DataCardValue

OnSelect: false

OnChange: false

Items: Distinct(Sort('[dbo].[vps_App_PAFNewProj_OneView]'.Account, Account), Account)

Value: Result

Default: Parent.Default

Reset: false

EmptySelection: true

 

Do you know what I could be doing wrong?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Continued Contributor
Continued Contributor

Re: Form not showing values selected in Gallery

Oh okay, that is interesting! Putting some labels in the app always seems to help somewhat haha. I think I need to understand the situation a little bit more though. As far as I understand, you're clicking on an item in the gallery, navigating to a different screen, and then seeing a form that's in edit mode, but it's not showing the data of the item you clicked on in the gallery right? What happens when you set the item property of the form to Gallery_main.Selected?

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer
www.sovereignsp.com

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Form not showing values selected in Gallery

What is the DataSource of your Form?

It should be the same Datasource as of your gallery.

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

Highlighted
Helper V
Helper V

Re: Form not showing values selected in Gallery

The datasources are the same
Highlighted
Continued Contributor
Continued Contributor

Re: Form not showing values selected in Gallery

Some thing to try could be adding a few labels that show varRecord information to make sure the record is being set (for example: varRecord.Title , or whatever other field if you don't have a "Title" field). You could also make sure the form is in the correct mode after you set the varFormMode variable. 

 

Also, when do you not see the data? When you click on the item in the gallery, after the form is submitted, or both? 

 

I tested a similar situation and it seems like your logic should work, I'm thinking it's something small or perhaps you could try deleting the form and re-adding it?

 

Let me know if any of this didn't make sense or if it's still not working!

 

Kind regards,


Ben Fetters

www.sovereignsp.com

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer
www.sovereignsp.com
Highlighted
Helper V
Helper V

Re: Form not showing values selected in Gallery

@BenFetters I think you're on to something. I havent tried deleting the form yet... I created labels using ThisItem.ID and ThisItem.OppAccount - The ID for that row is showing correctly however the data for the blank OppAccount is not showing which is really odd. I checked in SQL Server and the data is definitely there. In the gallery ThisItem.OppAccount is showing the correct data. The mode is correctly in edit.

 

I'm not seeing the data when you click on the item in the gallery, after the form is submitted

Highlighted
Continued Contributor
Continued Contributor

Re: Form not showing values selected in Gallery

Oh okay, that is interesting! Putting some labels in the app always seems to help somewhat haha. I think I need to understand the situation a little bit more though. As far as I understand, you're clicking on an item in the gallery, navigating to a different screen, and then seeing a form that's in edit mode, but it's not showing the data of the item you clicked on in the gallery right? What happens when you set the item property of the form to Gallery_main.Selected?

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer
www.sovereignsp.com

View solution in original post

Highlighted
Helper V
Helper V

Re: Form not showing values selected in Gallery

For posterity, I had to add an if statement so that if its in a new FormMode it still pulls up varRecord

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,082)