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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Why doesn't App Tab to...
Power Apps
Answered

Why doesn't App Tab to next Textbox in Gallery if UpdateIf() function is used in a Textbox?

(0) ShareShare
ReportReport
Posted on by 38

My App was working fine, but now isn't updating correctly.

 

When I change the value in the horizontal gallery, OnChange runs an UpdateIf, shown in the first screen shot below.   The whole time I was working on the App, when you changed the number, the Textbox would stay selected and I could tab to the next Textbox in the horizontal gallery.  

 

Now, when I change the value the Textbox loses focus and I have to manually click into the next record.  Any idea why this is happening? 

 

I save this App locally rather than on the cloud, and tried to open an old file, but the problem persists when I know it wasn't an issue when the version of the file was saved.  Please help!

 

I'm on a short timeline for work and would really appreciate any help with this issue.   

 

jzy5282_1-1654892796431.png

 

Parent Gallery Source:  Grouped Commitment Collection

Child Gallery Souce: Commitment Collection

jzy5282_0-1654892528575.png

 

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    This may sound stupid, but have you went through and set all your tab index values?

    Capture.PNG

  • jzy5282 Profile Picture
    38 on at

    No, I haven't touched the Tab Indexes at all.  

     

    It's like the parent gallery refreshes after each UpdateIf.  I attached a file showing the error.  After the number is input, I press tab and it doesn't move to the next textbox in the gallery record. ---> Power Apps and 9 more pages - Work - Microsoft​ Edge 2022-06-10 17-28-39.mp4

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Oh ok I see now, since the update is refreshing your gallery it resets it to the base mode so not sure if that can be changed just off hand, I will keep looking and let you know if i see anything

     

  • Verified answer
    jzy5282 Profile Picture
    38 on at

    Okay - so I figured out a workaround.  

     

    When the collection for the gallery is created (FormCollection),  I made a "copy" collection (CopyCollection). 

     

    The form continues to show the same collection (FormCollection), but the OnChange Update function points to the copy (CopyCollection).  

     

    Then you can patch the table with CopyCollection and ClearCollect FormCollection. 

     

    If you add a row or column, then you can Clear FormCollection and Replace with the current changes saved in CopyCollection.   To save to the table, patch the CopyCollection and ClearCollect to the Form to start again.  Woot

     

    e.g. below collects the changes you made in the form in to the form collection, as the copy collection which holds the changes, is patched to the original source table. 

    ClearCollect(commitment3, ShowColumns(Patch(PwrCo, commitment3copy), "ID","aID","cID", "hID", "nID", "Title","Commitment_Item", "Pop_Start","Number_of_Years","Recipient","Amount","Status"));
  • jzy5282 Profile Picture
    38 on at
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Great job, yah I knew you could wait on the update until end and prevent a gallery from technically refreshing until then but just assumed (you know what they say about assuming doh) that you needed it live for one reason or another, Great job though. Be sure to accept your explanation post as a solution so others can find the fix easier too

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard