web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to filter certain ...
Power Apps
Answered

How to filter certain users that start at certain times?

(1) ShareShare
ReportReport
Posted on by 503

Good morning

 

I'm trying to create a timekeeper app and when the user clicks 'login' I need there to be a check on the user to see if they have ANA next to their record in dataverse. If they have 'ANA' next to their record in dataverse then they need to have a default start time of 7am for them. Right now I have - 

Collect(
 'Time',
 {
 'User Code': TextInputUserCode.Text,
 'Login Time': DateTimeValue("7:00 AM"),
 'Logged In': Text("Yes"),
 }
);

This logic works for all users and starts them at 7am. How can I filter it so that it only works for users with ANA next to their record in dataverse and the rest of the users have login time 'Now()'. 

I;m guessing I have to create some sort of 'if' statement but Im unsure how to write it. 

 

I've also created another post in the dataverse forum to have a 7:00am default column next to each user so that I can just filter it this way but I dont think dataverse allows date and custom time columns, only date and time right now columns. 

 

Any help is much appreciated. Thank you all. 

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Usernametwice23 

     


    @Usernametwice23 wrote:

     'ANA' next to their record in dataverse




     

    About  'ANA' next to their record in dataverse - what do you mean by that? Is this 'Ana' a value of a specific column in dataverse? Assuming it is you can use the Filter function to narrow down by that value ANA in that column. However, am not sure what you mean can you clarify it? For example - is it something else like a part of a value of an existing column that may have something else on it instead - or even something else entirely?

     

     

  • Usernametwice Profile Picture
    503 on at

    Hi @poweractivate 

     

    Sorry I should have clarified. It is a lookup column in the users table in dataverse. 

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Usernametwice23 

     

     

    Based on LookUp function: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup#syntax

     

    LookUp(Table*, Formula [, ReductionFormula ] )

    • Table - Required. Table to search. In the UI, the syntax is shown as source above the function box.
    • Formula - Required. The formula by which each record of the table is evaluated. The function returns the first record that results in true. You can reference columns within the table. In the UI, the syntax is shown as condition above the function box.
    • ReductionFormula - Optional. This formula is evaluated over the record that was found, and then reduces the record to a single value. You can reference columns within the table. If you don't use this parameter, the function returns the full record from the table. In the UI, the syntax is shown as result above the function box.

     

    Once the specific user tries to Log in, can try LookUp function to find the unique User in the Dataverse table. For example, you can do something like

    Lookup('Users','emailaddress1' = User().Email)

     

    Presuming a Dataverse table called Users and a column called 'emailaddress1' that has a Unique value in there. You can replace with values that make more sense for your use case.

     

    Once you have fetched the unique user, you can easily just access that specific user's information thereafter. 

    You can even cross reference with the 'Time' dataverse table (if needed and if that's a table you have) and fetch/populate only that specific user's record with that information you want, perhaps by using the LookUp function again on the 'Time' table for example to check for and write to the specific Time record for that specific User only, perhaps by a unique identifying key like the e-mail address (for example) to LookUp by.  

     

    Check if something like the above helps.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 421

#2
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 278 Super User 2026 Season 1

Last 30 days Overall leaderboard