cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ShanP
Level: Powered On

Count rows for specific cell

I have a app where a new user or existing user can enter data into a form. If they are an existing user, it is sorted by their last name and then all forms they have created are viewed. If they are a new user, they can create a new user in the system, but they don't have an pre existing data, so there is no point for them to go to the page where all the forms are viewed. I would like to send them straight to the form creation page.

 

So the users are sorted by name in a column "User." When a new user is created, a row is automatically made in my excel file, the only cell filled in that row is under the column "User," whereas every other cell is empty. Is there a way I can sort or filter this, so that if the user is new and the only cell filled is their name, that I can send them straight to a specific page?

 

I was thinking of maybe using a combination of isBlank or countrows but I can't figure it out.

3 ACCEPTED SOLUTIONS

Accepted Solutions
BitLord69
Level 10

Re: Count rows for specific cell

Where and how do you create a new user? If they do it themselves when they create the first form, you might be able to use CountIf or Lookup - if there is no record you know it's a new user and you can skip right to the form creation page:

 

If(CountIf(datasource, User = User().FullName) = 0, Navigate(FormcreationPage....))

 

If(IsEmpty(Lookup(datasource, User = User().FullName)), Navigate(....) )

 

Good luck!

 

View solution in original post

BitLord69
Level 10

Re: Count rows for specific cell

User is the column in your database that you referred to, and User().FullName is a built in function that retrieves the user name of the current user of the app.

 

In your case it's used to filter so the current user can see only his or her own entries.

View solution in original post

BitLord69
Level 10

Re: Count rows for specific cell

Why let them do the extra work and select user if you already know which user it is?

 

Using the function User().FullName you get the name of the user currently using the app, so you can remove the page/drop down with users altogether, making the interface smoother and less error prone (maybe it's not a huge problem if they select the wrong name, but still).

 

 

View solution in original post

5 REPLIES 5
BitLord69
Level 10

Re: Count rows for specific cell

Where and how do you create a new user? If they do it themselves when they create the first form, you might be able to use CountIf or Lookup - if there is no record you know it's a new user and you can skip right to the form creation page:

 

If(CountIf(datasource, User = User().FullName) = 0, Navigate(FormcreationPage....))

 

If(IsEmpty(Lookup(datasource, User = User().FullName)), Navigate(....) )

 

Good luck!

 

View solution in original post

ShanP
Level: Powered On

Re: Count rows for specific cell

What does this do and how does it work?

" User = User().FullName "

 

BitLord69
Level 10

Re: Count rows for specific cell

User is the column in your database that you referred to, and User().FullName is a built in function that retrieves the user name of the current user of the app.

 

In your case it's used to filter so the current user can see only his or her own entries.

View solution in original post

ShanP
Level: Powered On

Re: Count rows for specific cell

When the app is opened, the user is shown a page with existing users. If their name is not there, they can add themselves and then be directed back to the page with existing users. They can click on themselves to go to another page which shows all forms done by them. But if they are new, they would have no forms done, so it doesn't make sense to send them to that page, but rather to send them straight to a new form page.

BitLord69
Level 10

Re: Count rows for specific cell

Why let them do the extra work and select user if you already know which user it is?

 

Using the function User().FullName you get the name of the user currently using the app, so you can remove the page/drop down with users altogether, making the interface smoother and less error prone (maybe it's not a huge problem if they select the wrong name, but still).

 

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,897)