cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Responsive Resident
Responsive Resident

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

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

@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

View solution in original post

TesDA
Responsive Resident
Responsive Resident

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (74,272)