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 / If Statement to pick i...
Power Apps
Answered

If Statement to pick items from Sharepoint, otherwise use the Default Office365

(0) ShareShare
ReportReport
Posted on by 186

I am building an application that one can be able to update their details. I have a display screen and an edit screen. The display screen has most items showing data from AD. These items include country, manager, Department etc. However, AD is not usually updated as first and so I would love to do an if Statement that if for the view Screen. For example  if the department item is updated, it should show from SharePoint, otherwise, it should show from AD. 
The country AD code is

Office365Users.MyProfile().Department

The Country SharePoint code is

varRecord.department

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Rick_black 

    Set your formula to:

    Coalesce(varRecord.department, Office365Users.MyProfile().Department)

     

    That is what the Coalesce function is all about...the first value that is not blank.

     

    I hope this is helpful for you.

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
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard