Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Gallery that shows items with facility name and without facility name

(0) ShareShare
ReportReport
Posted on by 44

I have a gallery that shows records with Facility Name and with Blank Facility Name where the gallery filters based on the dropdown. 

The idea is that the gallery will show all the records of my facility and blank facility BUT if I edit the item, it should create a record with the facility name from the dropdown WHILE having the same record without an assigned facility.

North Carolina

Department Name       Facility Name

Dept 1                           Blank

Dept 2                           Blank

Vancouver

Department Name       Facility Name

Dept 1                           Blank

Dept 2                           Blank

If I edit the record, the end result should be like this:

North Carolina

Department Name       Facility Name

Dept 1                           North Carolina

Dept 2                           Blank

Vancouver

Department Name       Facility Name

Dept 1                           Blank

Dept 2                           Blank

Does that make sense?

helpPowerApps_0-1694830139268.png

 

Categories:
  • Michael E. Gernaey Profile Picture
    41,254 Super User 2025 Season 1 on at
    Re: Gallery that shows items with facility name and without facility name

    Hello,

     

    If I understand correctly it seems you are using the "blank one" as a placeholder for "Add New". It works, but I would recommend that you instead have a + Sign outside the gallery and then display a... (can be a form, or control you create) that is invisible until they click the +. Then they type stuff in. Click Save on that Form, it updates the datasource, which updates the collection (or however you are populating the gallery), you refresh and bingo it displays.

     

    But if you want to do it how you are, you can simply use a Patch statement to do a Create, versus and Update to the blank record so do a Patch(datasource, Defaults(Datasource), versus a Patch(datasource, LookUp(datasource, field=x)

     

    Then when you refresh your new record is there and your original blank one too.

    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard