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?
Solved! Go to Solution.
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?
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
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
@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
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?
For posterity, I had to add an if statement so that if its in a new FormMode it still pulls up varRecord
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
257 | |
247 | |
83 | |
36 | |
29 |
User | Count |
---|---|
297 | |
268 | |
117 | |
65 | |
45 |