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?
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
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473