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 Apps
Answered

User table in CDS

(0) ShareShare
ReportReport
Posted on by 945

Hi,

 

Someone can help me to find out what's wrong with my formula ->

ClearCollect(Coll1, Filter(Users, 'User Name' = UserId.Text));

 

I have a connection named "Users" which is a CDS connection ->

Axal_0-1615832296022.png

 

And my control name for text input is UserId

 

So that is my formula, to get the record from table Users, doesn't it ?

then I put this formula in a button, in the OnSelect property.

I check in that CDS table, there is a user with what I'm key in in the UserId text input. But I don't know why, when I checked the collection, it is always empty.

 

Thanks,

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Axal ,

     

    'User Name' column stores the user's email address.

    Did you enter the correct email address?

     

    You could try the formula on button control :

    ClearCollect(Col1,Filter(Users,UserId.Text in 'User Name'))

     

    You could try the following steps:

    1\ Add a textinput control

     

    2\ Add a button control to create a collection

     

    3\ Add a label control and set its Text property to:

    First(Col1).'Full Name'

     

    4\ The result is as follows:

    2.PNG

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Axal Profile Picture
    945 on at

    Hi @v-xiaochen-msft 

     

    Yes, I input the correct email address. I was also tried to use a simple array like this :

    ClearCollect(Coll1, {Usr:UserID.Text})

     

    That is working fine, by checking through File=>Collection, I can see it correctly. So my assumption is nothing's wrong with the UserID.Text, it is the Filter function to that Users table which I cannot determined is it to the correct table, because it always brings empty record.

     

    I haven't try exactly like yours, but I did just now change by using "IN" instead equal sign -> ClearCollect(coll1, Filter(Users, UserId.Text in 'User Name')); Still it is result empty collection,

     

    Thanks.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Axal ,

     

    Most values are empty, making you think the collection is empty.

    You could try to add a label control to check if there is a value in the 'Full Name' column of the collection.

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Axal Profile Picture
    945 on at

    Hi @v-xiaochen-msft ,

     

    Yes, you are right. What if I want to add Password for the 2nd condition ? Is the Users table able to validate it ?

    I mean like what if I add like this 

    ClearCollect(coll1, Filter(Users, 'User Name' = UserId.Text, Password = UserPassword.Text));

     

    Before I added Password, it was works just as you said. I did however input the correct password, it just now the Filter result really don't have any records.

     

    Thanks

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Axal ,

     

    I did a test for you .

    But i didn't encounter your problem.

    v-xiaochen-msft_0-1615879278857.png

    // Password is a text column I created. 

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

  • Axal Profile Picture
    945 on at

    Hi @v-xiaochen-msft ,

     

    Means you just added new column "Password"  in Users table ? What if I want to use my existing password, can I use this table ? or there is another table for this validation ? My intention is to use UserId and Password I'm using in this tenant, so will other user that later on use my Apps, it's gotta to be inside my organization.

     

    Thanks,

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Axal ,

     

    The User table itself has no Password column. 

    Where does your password come from?

    Sorry i am confused about this.

     

    Best Regards,
    Wearsky

  • Axal Profile Picture
    945 on at

    Hi @v-xiaochen-msft ,

     

    Yes, I noticed there is no Password column in Users table, but it didn't throw me an error as well when I'm using it in my formula, I took a guess that maybe this column is somehow hidden because it is a "password".

     

    Sorry to confused you, so basically I'm creating Login screen for my Apps. And as typical login, it has UserID and Password. These two information are the one I need to validate against some table. So actually that is my question, is how to validate when user key in UserID and password ?

     

    As mentioned, this Apps will be used to connect to my system inside my tenant, so obviously this validation is going to check against the existing user security. I only know there is Users table that keep username, how about Password ? 

     

    Thanks.

     

     

     

  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Axal ,

     

    The user's password will not be automatically saved to the dataverse table.

    When users log in to the powerapps mobile client, they need to enter a password.This is already a way of verification.

    If you want to perform secondary verification in the app, I suggest you manually create an "account-password" table.

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard