Skip to main content
Community site session details

Community site session details

Session Id : 1FZamF1I458BUVYkcnyfI2
Power Apps - Building Power Apps
Unanswered

Gallery that shows items with facility name and without facility name

Like (0) ShareShare
ReportReport
Posted on 16 Sep 2023 02:16:54 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
    45,691 Super User 2025 Season 2 on 16 Sep 2023 at 02:52:52
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete