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 / Look Up on department ...
Power Apps
Answered

Look Up on department mapped to division in DV table - please help!!!

(0) ShareShare
ReportReport
Posted on by 802

Hi there, 

 

I have an app whereby I need to navigate users to different screens based on their Office365User department. 

 

In a Dataverse table, all of these O365 department names have been entered into one column, with a corresponding column being their top-level divison.

 

I want some formula so that, OnSelect of a button, the user is navigated to a certain screen like below.

 

Let's say the user's 365 department is, say, "Shipping" (obtained from Office365Users.MyProfile().department), lookup to the dataverse table for 'Shipping' in the Name column, and pull back the corresponding row's entry from the Division column which could be "Logistics".   THEN, if this result is "Logistics", navigate to X screen.

 

I realise this could be a long piece of code, as I will need to expand it for all the departments and divisions.

 

Thanks, K

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Try this, which is a behavior formula and must be placed in a property start with "On", e.g. OnSelect, OnVisible:

    Switch(LookUp(Shipping, Name = Office365Users.MyProfile().department).Division,
     "Logistics",
     Navigate(Logistics_Screen),
     "Administration",
     Navigate(Administration_Screen),
     Navigate(Default_Screen) // the default choice if nothing matches
    )

    You'll need to adapt table, column, screen names to suit your situation.

     

    Hope that helps,

    Bryan

  • Kosenurm Profile Picture
    802 on at

    @BCLS776 

     

    Thank you so much - that's great.

     

    I get a delegation warning, however, even though the DV source only contains 300 rows... Any ideas to get rid of this?

     

    Thanks

    K.

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    You can safely ignore a delegation warning that will stay well under the delegation row limit (500 default, can be increased to 2000). However, this should make it go away:

    With({aLookup: LookUp(Shipping, Name = Office365Users.MyProfile().department).Division},
     Switch(aLookup,
     "Logistics",
     Navigate(Logistics_Screen),
     "Administration",
     Navigate(Administration_Screen),
     Navigate(Default_Screen) // the default choice if nothing matches
     )
    )

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard