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.
Solved! Go to Solution.
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)
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.
Where is this formula being used?
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
)
Shouldn't the Set() be Set(varUserName, Lower(User().FullName))
Yes, I've set that at the app itself. But the error still persists.
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)
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.
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.
User | Count |
---|---|
194 | |
126 | |
90 | |
48 | |
44 |
User | Count |
---|---|
280 | |
160 | |
138 | |
81 | |
76 |