cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Error and Incorrect Data Type

I'm currently trying to Set() the data into a text type data so that when the user can match their username in Sharepoint List. Problem is I found out that it only works for some people where their data will be pulled correctly. I found out later that the Set() had some issues with is that can be seen in the screenshot below. Anyone have any idea on how to solve this error? I'm trying to get the data to a text type data so that it could match. Or are there other reasons why that the data is not matching. Some people have shown data while some come out blank.

 

 

Set(userName, Lower(User().FullName))

 

 

I can further explain this down the road.

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Resolver II
Resolver II

Instead of fullname try email.

OR

Maybe instead of using the set try inserting a label and reference the label in your lookup.

Lower(user().email)

View solution in original post

HI @gimar01 ,

A Person field type is not Delegable in your filter and Name is not a good title for a field (it is a Reserved Word in Power Apps), but try this

With(
   {
      wLeave:
      AddColumns(
         Filter(
            'EMP Leave Quota',
            'Leave Type' = "Carry Forward Leave"
         ),
         "NameUser",
         Name.DisplayName
      )
   },
   LookUp(
      wLeave,
      Lower(NameUser)= varUserName
   ).Entitlement
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

9 REPLIES 9
Super User
Super User

Where is this formula being used?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

This is the code that's used to extract the data from Sharepoint and display on the user's screen

With(
   {
      wLeave:
      Filter(
         'EMP Leave Quota',
         'Leave Type' = "Carry Forward Leave"
      )
   },
   LookUp(
      wLeave,
      Lower(Name.DisplayName)= varUserName
   ).Entitlement
)

 

 

Super User
Super User

Shouldn't the Set() be Set(varUserName, Lower(User().FullName))



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Yes, I've set that at the app itself. But the error still persists.

Resolver II
Resolver II

Instead of fullname try email.

OR

Maybe instead of using the set try inserting a label and reference the label in your lookup.

Lower(user().email)

View solution in original post

The table doesn't have a list for their emails, only their names that match well.

 

HI @gimar01 ,

A Person field type is not Delegable in your filter and Name is not a good title for a field (it is a Reserved Word in Power Apps), but try this

With(
   {
      wLeave:
      AddColumns(
         Filter(
            'EMP Leave Quota',
            'Leave Type' = "Carry Forward Leave"
         ),
         "NameUser",
         Name.DisplayName
      )
   },
   LookUp(
      wLeave,
      Lower(NameUser)= varUserName
   ).Entitlement
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

I found the error and it turns out that some people have a middle name that doesn't show when it's User().FullName
Using Office365 does solve the issue though. I'll accept some solutions here that helped me as well.

 

Thanks @gimar01 ,

Good to see you got it working - pity you cannot use emails.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (79,940)