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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Surname cannot be foun...
Power Apps
Answered

Surname cannot be found in other list where surname and first name are together in one column

(0) ShareShare
ReportReport
Posted on by 18

In Office365 user are present user with surname and first name.
In SharePoint list Rights_assignment users where surnames and first names are displayed in a column (Person_or_group).
Page recognizes who is currently using the page and accordingly should look in SharePoint list Rights_assignment whether he is entered there.
If yes, a gallery opens which is intended for admins, otherwise normal gallery.

My problem that I always get the value TRUE and first Navigate is selected even if the user is not listed in SharePoint list Rights_assignment.

As it looks, the code as written will always return a non-blank result, even if the surname of the Office365-Benutzer is not in the Person oder Gruppe display name.

How should it be?
If the result of the Concat function is not blank, the first Navigate function will be executed and the user will be redirected to the Dashboard_Admin screen. Otherwise, the second Navigate function will be executed and the user will be redirected to the Dashboard screen.
What am I doing wrong?


If(!IsBlank(
Concat(
Filter(
Rights_assignment;
'Office365-User'.MyProfile().Surname in 'Person_or_group'.DisplayName
);
'Person_or_group'.DisplayName;
""
)
);
Navigate(Dashboard_Admin;Transition.None);
Navigate(Dashboard;Transition.None)
);;

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,059 Most Valuable Professional on at

    Hi @Milut1n ,

    Try this

    If(
     !IsBlank(
     LookUp(
     Rights_assignment;
     'Office365-User'.MyProfile().Surname in 'Person_or_group'.DisplayName
     ).ID
     );
     Navigate(Dashboard_Admin;Transition.None);
     Navigate(Dashboard;Transition.None)
    );;

     You do not need Concat as you are simply looking for the Surname to exist somewhere in the field. Also, ID can be any field in the list - you are just checking to see if you have a matching record value.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Milut1n Profile Picture
    18 on at

    It is often small things that I overlook and then make even more complicated. Thank you very much goods for your help. 

    A question, how can I add the code properly here so that it looks like yours? For Discord for example do it like this

    ```c
    code
    ```

  • WarrenBelz Profile Picture
    153,059 Most Valuable Professional on at

    Hi @Milut1n ,

     The </> icon second last in the top row is the Code box - just use spaces to indent.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard