web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery item disappear...
Power Apps
Unanswered

Gallery item disappearing after form submit

(1) ShareShare
ReportReport
Posted on by 107
I am running tests for a patch function when a new issue has occurred
 
when enter the form into edit mode on a selected record from RecordsGallery1 after hitting submit button the record in the gallery disappears when it shouldnt as the gallery is filtered to show all table items that are NOT closed using this formula in the Items property
 
Filter(Table_ecis, closed = Boolean(0))
 
the table is an SP List
the 'closed' column is a "yes/no" column type
when i goto the SP list and look at the record the closed value is still 'No' which displays as no check mark in the list
Editing, checking and unchecking then going back to the app brings the record back
in my form in my app I replaced the on off toggle with checkbox control for closed field but in my tests i am not changing it.
 
is the issue with the checkbox control change? how would i remedy this?
 
 
Update Edit:
 
SO a part of the issue is the record i edited made the value 'closed' become blank
 
out of curiosity I changed the Items property of gallery to 
Filter(Table_ecis, closed = Blank())
 
and it ONLY returned the record that I did a test edit on. 
 
I checked the Default value of the check box for closed field and changed it to thisitem.closed  edited it checked and unchecked, saved
Changed the items property of back to the Boolean(0)  it reappeared on the gallery
went to edit mode again and saved  it disappeared again so something is changing the value from False to Null in my SPlist when i am submitting the form
what am i missing? The value of an unchecked box is False so why would it make it null?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,351 Super User 2025 Season 2 on at
    Hi,
     
    Please remember, we are doing this for free, and most of the folks asking for help are stressed so I get it, but understand, its on you to write it clearly, with pictures and with code.
     
    Here is what I believe I am reading.
     
    1. You have a Gallery.
    2. A new issue happens
    3. You click the item in the Gallery so you can edit it
     
    Then you changed because you made a code change (you should have just removed that stuff above your update, as its not relevant anymore)
    •  If you had a bug which made the value you were so certain was NOT blank, blank, it makes sense when you change your filter that it only lists that record.
    • Now you have a whole big paragraph of stuff, with no code, no pictures, no videos, nothing.
    Please slow down and I promise we will help you, but make it make more sense.
     
    1. Put your code back to the Original, please do not change it
    2. Clearly in your Patch(I know you already know) you were making it Blank, that is fine, we should be able to fix that easy
     
    Then you have this whole paragraph I am not going to re-paste, that tells me you have a bug in your code, in your Patch, but you aren't sharing it 
    and it would seem obvious to share that since ITS the problem.
     
    My guess is, that your patch should be easy to fix, so please just post that. But I want to add, that you should do this
    1. Do your Save
    2. Go check the data DO NOT just look at the Gallery, the bug could be there for all I know
    3. If the data RIGHT after the Patch is WRONG then your patch is the problem.
     
    Share the code please.
     
  • CP-23071818-0 Profile Picture
    107 on at
    FLMike, sorry for not being clear, I was confident the patch is unrelated I was only stating what I was doing when I noticed the issue
     
    Here is the patch code that does not include the closed field thus why i left it out. the Form actually does 2 submissions  one using this Patch in Onsuccess property of form1_1 and then the other using a standard "Submit(form1_1)" when the Submitformbutton1_1 is selected. 
     
    the patch feeds another table, not the table that the form is drawing from. I checked the records prior to posting. I am using an SP list Yes\No field that on screen looks like a Check is present for "Yes" or not present for "No" so me reading the SP list data on my screen its hard to see if it was being considered false or Null. I didn't think about the possibility it was saving a null value until after i posted. 
     
    ForAll(
       Filter(
          Gallery1.AllItems,
          Checkbox2_1.Value
       ) As _Data,
       With(
          {
             _Records:
             Filter(
                ECI_Dies_1,
                dienum = Gallery1.Selected.Checkbox2_1.Text &&
                eci_id = SelectedRecordTitle1_1.Text
             )
          },
          If(
             CountRows(_Records) > 0,
             Patch(
                ECI_Dies_1,
                {
                   dienum: _Data.Checkbox2_1.Text,
                   eci_id: SelectedRecordTitle1_1.Text,
                   product: DataCardValue9.Selected.Value,
                   content: DataCardValue4_1.Text,
                   eci_level: DataCardValue3_1.Text,
                   trial: Checkbox8.Value,
                   cavity: DataCardValue2.Selected.Value
                }
             )
          )
       )
    );
    UpdateContext(
        {
        CurrentItem: Self.LastSubmit,
        editMode: false,
        newMode: false
        }
    )
     
    Example of Table data from my perspective. 
     
     
    When clicking Submit form button while form edit mode is active it was changing existing value in Closed
    field of the record from false to blank. Checkbox 7 is the checkbox control associated with the datacard 
    for closed field on the form 'closed_Datacard1'
     
    RecordsGallery1 Items
     
    Filter(Table_ecis, closed = Boolean(0))
     
    Item property of Form1_1
    RecordsGallery1_1.Selected
     
    Default properties for closed_Datacard1 and Checkbox7 inside closed_datacard1
    Thisitem.closed
     
     
    I do feel like this is going to boil down to a property I am overseeing that I neglected to assign/reassign
     
     
     
     
     
     
     
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard