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 / Count Rows in Gallery
Power Apps
Answered

Count Rows in Gallery

(0) ShareShare
ReportReport
Posted on by 204

Hi Guys,

 

I want to count all the items in a gallery which I have by using the following code

CountRows('Gallery1'.AllItems)

 

My gallery is dynamic so will change with the number of count rows.

Each line within my gallery has an input textbox.

 

What I want to do is that if there are a Count Row of 3 each input textbox within my gallery must have text.

 

Example 3 Rows, 3 textboxes must have text. 5 Rows, 5 textbox must have text.

 

Need an if statement something along the lines of:

If(CountRows('Gallery1'.AllItems) <> CountRows('Gallery1'.Inputtextbox),
do something,
else)

 

Is there any way to count the input textboxes to see if they are not blank.

 

Any help is greatly appreciated.

 

Thanks

Categories:
I have the same question (0)
  • MJ84 Profile Picture
    263 on at

    Hello,

     

    I'm not 100% sure on what you are trying to achieve but from what I understand if the row is showing in the gallery you just want the input text box to contain some text?.... Do you want each input box to show different text or the same?

     

    If it's the same text then you could use the below?

     

    MJ84_0-1677044120410.png

     

  • Verified answer
    christian12 Profile Picture
    204 on at

    @MJ84 

     

    All good.

     

    Figured it out

    If(CountRows('Gallery1'.AllItems) <> CountIf('Gallery1'.AllItems,Len('Input-text')>0),
    "No",
    "Yes")

     

     

     

     

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
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard