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.
Solved! Go to Solution.
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!
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.
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).
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!
What does this do and how does it work?
" User = User().FullName "
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.
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.
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).
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |