cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Continued Contributor
Continued Contributor

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
BenFetters
Continued Contributor
Continued Contributor

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
Rahber
Solution Sage
Solution Sage

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

TesDA
Continued Contributor
Continued Contributor

The datasources are the same
BenFetters
Continued Contributor
Continued Contributor

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
TesDA
Continued Contributor
Continued Contributor

@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

BenFetters
Continued Contributor
Continued Contributor

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
TesDA
Continued Contributor
Continued Contributor

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,629)