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 / Looping through all (T...
Power Apps
Suggested Answer

Looping through all (Text) controls on a form?

(0) ShareShare
ReportReport
Posted on by 358
hi,
is there a way to loop through all the text controls we have on a form?
 
We want to check if the parent card is Visible, Required, not empty and add that to a Global Errors collection we can display on Submit to prevent Patch errors
 
When I search in Google, the AI comes up with this:
Clear(TextControlsCollection);
ForAll(
    AllControls,
    If(
        ControlType = "TextInput" || ControlType = "Label",
        Collect(TextControlsCollection, ThisControl)
    )
);
 
but it seems that's a mistake, as no such option as AllControls is available in PowerApps
Categories:
I have the same question (0)
  • Suggested answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Sorry. You have to explicitly reference the control by name, check the condition then add it to your global errors collection.
     
     
     
    If this answered your question please mark it as such

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard