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

Details/Edit Screen from Nested Gallery

Hello,

 

I have two galleries, one nested inside of the other. The top-level gallery, Gallery1, is displaying items "Grouped" by "Status" using the distinct function (thanks @wyotim, I am using your solution again in another application already) and the nested gallery, Gallery2, is expanding or contracting to show the items with that particular "Status" when clicked. This looks and functions pretty great but the issue I am having now is that when I add icons/buttons to the Edit or Details screen, it is not displaying any of the data. I was using the same setup before nesting it and it was working as intended and I haven't been able to find anything about how to overcome this issue. Any help would be greatly appreciated!

 

Gallery1.PNG

 

Gallery2.PNG

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
wyotim
Resident Rockstar
Resident Rockstar

Hey @CarlHRVA! Am I understanding correctly that you are trying to click on the button/icon and get the data from that item to another screen to view or edit it? What code are you using to get the item's data? Assuming I am understanding correctly and you aren't trying this already, I would suggest using a variable to store the item's data to bring it into the other screen like so: 

// For a local variable (one that can be used only on the screen it is in)
Navigate('My Screen Name', ScreenTransition.None, {varItemData: ThisItem})

// For a global variable (one that can be used anywhere in the app)
Set(glbItemData, ThisItem);
Navigate('My Screen Name', ScreenTransition.None)

You can then use the variable name (glbItemData or varItemData) to reference the item in a form's Item property or in the controls you are using if you made a custom form (e.g. varItemData.FieldName). Nesting the galleries can cause trouble with a few things and referencing the data in them is one of those areas. I'm actually not sure if it is a fully supported methodology but I use it quite a bit and it generally works great once the kinks are ironed out.

 

On the very possible chance that I am not fully understanding your issue, feel free to help me with where I am going astray! Cheers!

View solution in original post

CarlHRVA
Continued Contributor
Continued Contributor

Thank you both for your help, as always. Yes, this is using a SharePoint list as a data source and what I ended up doing ( and should have thought of sooner/on most of the apps I've worked on😑) is allowing PowerApps/SharePoint to generate a test app for me and then seeing how that app handled each field on the edit/display screens. Although your answer to my original question was the solution I was after (to use a variable because of the nested gallery), my secondary issue was resolved by setting the default value on the entire data card rather than the dropdowns themselves. Thanks again for your help!

View solution in original post

10 REPLIES 10
wyotim
Resident Rockstar
Resident Rockstar

Hey @CarlHRVA! Am I understanding correctly that you are trying to click on the button/icon and get the data from that item to another screen to view or edit it? What code are you using to get the item's data? Assuming I am understanding correctly and you aren't trying this already, I would suggest using a variable to store the item's data to bring it into the other screen like so: 

// For a local variable (one that can be used only on the screen it is in)
Navigate('My Screen Name', ScreenTransition.None, {varItemData: ThisItem})

// For a global variable (one that can be used anywhere in the app)
Set(glbItemData, ThisItem);
Navigate('My Screen Name', ScreenTransition.None)

You can then use the variable name (glbItemData or varItemData) to reference the item in a form's Item property or in the controls you are using if you made a custom form (e.g. varItemData.FieldName). Nesting the galleries can cause trouble with a few things and referencing the data in them is one of those areas. I'm actually not sure if it is a fully supported methodology but I use it quite a bit and it generally works great once the kinks are ironed out.

 

On the very possible chance that I am not fully understanding your issue, feel free to help me with where I am going astray! Cheers!

CarlHRVA
Continued Contributor
Continued Contributor

@wyotim Brilliant! Thank you as always. I spent the last 2 hours trying to use a collection but a variable is working great. I do have one other issue I don't really understand. For all of my dropdowns/comboboxes it doesn't like anything I've tried or if it does it doesn't display the data. I'll show some screenshots, maybe you could point me in the right direction there as well? I very much appreciate all of your help, you are an absolute life saver.

 

Account Rep.PNG

 

Industry.PNG

 

Product.PNG

 

Promotion.PNG

 

Status.PNG

 

Hi @CarlHRVA ,

 

Have your issue been resolved? If not, happy to help further.

From the snapshot, we can see that the output of varItemData.Product is Table, so you can try to use First(varItemData.Product).Value to display in Label.

Hope this helps.

Sik

CarlHRVA
Continued Contributor
Continued Contributor

Thank you for your help! Unfortunately, this doesn't seem to work for me. Any idea why? Also, what about those with a data type of Record? Thank you again, would love to have this resolved and understand how to handle this in the future.

 

Product.PNG

 

Promotion.PNG

 

CarlHRVA
Continued Contributor
Continued Contributor

Okay, so this DOES work to display it in the label. Is it possible to display this in the dropdown as this is an edit screen? Does it matter if my data source values do not match what I am trying to populate the dropdown with?

 

Product.PNG

 

Thanks,

Carl

Hey @CarlHRVA, this is a question I should have asked sooner but what data source are you using? SharePoint? I noticed that some of the time the variable reference is showing as a record and others as a table. I am guessing that there are some complex data types in each record, which is probably where these issues are coming from. As @v-siky-msft so keenly observed, for the fields that are returning a table of data, using First(...) should help, though you might need to use something other than Value, depending on the structure of your data. 

 

As to whether it matters if your data source values match what you are trying to populate the dropdown with, yes it does. There needs to be some commonality so that the dropdown can recognize the value being stored in the record both to write something useful when the record is updated as well as to recognize the default item in the record. Depending on the structure of your data, this could be a line of text, an ID from a table of data, etc. Complex data types in SharePoint work a little differently than the more common types like text and numbers. I'm not too well versed in them as we don't use SharePoint where I work so I'll need to read up a bit if those are being used. 

 

Could you share what you have in one of the Item sections of your dropdowns and how that data relates to the field in the record? It could be different for each one, so feel free to share if there are different scenarios. Also, could you share what the error is that it is giving when you try to use the varItemData.Something as well as the First(varItemData).Value? We'll get this sorted yet! 

CarlHRVA
Continued Contributor
Continued Contributor

Thank you both for your help, as always. Yes, this is using a SharePoint list as a data source and what I ended up doing ( and should have thought of sooner/on most of the apps I've worked on😑) is allowing PowerApps/SharePoint to generate a test app for me and then seeing how that app handled each field on the edit/display screens. Although your answer to my original question was the solution I was after (to use a variable because of the nested gallery), my secondary issue was resolved by setting the default value on the entire data card rather than the dropdowns themselves. Thanks again for your help!

@CarlHRVA good call with the generated app! That can be a great way to see what is going on with things. I am happy you were able to get this sorted. 👍

Anonymous
Not applicable

Any solution found on this topic?

Helpful resources

Announcements

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!      

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

October 2023: Celebrating New User Groups & Events to Check Out!

It's time for our monthly celebration of new user groups that recently joined our community, along with events happening nearby--or even virtually!  There's so much going on our community, it's a great time to pause and celebrate what is happening in our user groups and in our community this October!   PLEASE WELCOME THESE NEW USER GROUPS: Biz Apps Community User Group - Power Platform Community (microsoft.com)  This user group is dedicated for any community members of all skill levels to learn how to get the most out of their community experience. East Michigan Power Platform User Group - Power Platform Community (microsoft.com)  This is the start of a new community covering eastern Michigan, built around the Power Platform. Biz Apps Community User Group  This user group is dedicated for all community members of all skill levels to learn how to get the most out of their community experience.   EVENTS TO CHECK OUT: IN-PERSON AND ONLINE In-Person: September 2023 Hybrid Philadelphia Dynamics 365 & Power Platform User Group Meet  Dynamics 365 and Power Platform Physical Meetup  Hyderabad Power Platform User Group Meetup - Sept 2023 (In-Person)  Manchester September 2023 In Person Meeting  Virtual: Everything Dataverse, Do you know that Dataverse is more than just a Database! POWER PLATFORM MONTHLY DIGEST- SEPTEMBER Baltic Summit 2023 PL-900 Power Platform Fundamentals Training HR and L&D transformation through Power Platform Dynamics 365 Marketing Experience User Groups - Use Cases and Networking Power Platform and Dual Write from Dynamics 365 F&O Perspective ANZ D365 FinOps Team September 2023 meetup 

Top Solution Authors
Top Kudoed Authors
Users online (4,328)