Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Weird Glitches in ForAll & Getting Galleries to load Properly for OnChange

(1) ShareShare
ReportReport
Posted on by 16
Hi everyone,

I have this weird problem where when I call If(IsBlank(LookUp) in my forAll (my forall is going through a collection seeing if the record exists already in a Dataverse table) it glitches out badly and doesn't perform as expected.

I also have this issue where I have a gallery that has controls with onChange functionality, that only glitch when a large datasource is loaded. I even have a timer when the screen becomes visible to give it time to load but it doesn't work no matter how much time I give it. Does anyone have a solution for that?
  • AnthonyIsAdulti Profile Picture
    16 on at
    Weird Glitches in ForAll & Getting Galleries to load Properly for OnChange
    Here is the code for the save button.

    ForAll(requestedToolCollection, 
        If(!IsBlank(LookUp('Dataverse Table', 'Dataverse Table ID' = ThisRecord.'Dataverse Table ID' && 'Item #' = ThisRecord.'Item #' && 'Tool Status' = 'Dataverse Table Status Choices'.New)),
        
            Patch('Dataverse Table', LookUp('Dataverse Table', 'Dataverse Table ID' = ThisRecord.'Dataverse Table ID' && 'Item #' = ThisRecord.'Item #' && 'Tool Status' = 'Dataverse Table Status Choices'.New),
            {
            Requested: ThisRecord.Requested,
            Comments: ThisRecord.Comments 
            }
        )
        ,
            Patch('Dataverse Table', Defaults('Dataverse Table'),
                {
                    'Item #': ThisRecord.'Item #',
                    Name: ThisRecord.Name,
                    Requested: ThisRecord.Requested,
                    'Dataverse Table ID': Dataverse Table_ID,
                    'Tool Status': 'Dataverse Table Status Choices'.New,
                    'Tool / Toolkit': ThisRecord.Name,
                    Comments: ThisRecord.Comments 
                }
            )
        
        )
        
    );


    The collection "requestedToolCollection" works fine and has all the proper values, its just when I patch those values into the Dataverse table it patches incorrectly. It hasn't been consistent so far, or at least have a pattern that I have been able to notice.

    he save button itself doesn't have any onChange code, but its onVisible is when there is a change of any of the controls in the gallery.

    In my gallery, I have an onChange on the text input and combobox controls that patches that value to the "requestedToolCollection."

    That is all. Let me know if you have any questions.
     
  • Michael E. Gernaey Profile Picture
    40,375 Super User 2025 Season 1 on at
    Weird Glitches in ForAll & Getting Galleries to load Properly for OnChange
    Hi,
     
    You didn't show us any code, or explain what "glitches means".
     
    Can you help me understand what you need help with, that you shared?
     
    1. Share your code
    2. Share your Ui so we can see
    3. Share the OnChange
    4. Share your Onvisible
     
    etc etc
     
    Please, share  as we cannot see your screen and nothing you said is going to specifically help us help you :-( I am afraid, without seeing it.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard