On my app I am trying to display the current users department by default. On the app that department field is a combo box. Originally in SharePoint that field is a choice field with choices (SITE,WORKS,OFFICE), On the apps is there a way to default it to the current users department. I've already tried with using Office365Users.MyProfile().Department, but it comes out as an error.
Solved! Go to Solution.
Just to make sure, your organization has Department properties on the profiles?
This is the correct way to get department as you stated:
What is the error you are getting?
@DylanSimons I've tried that in field datacard default function and the defaultselecteditems in the datacard.
You can see from the image below there under the formula box it displays the department but I'm unsure why it comes out as an error.
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
@eka24 I've tried this as well in all both field datacard and combobox default function as well as the defaultselecteditems. Would the issue be because the field is a choice field.
Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.
Did you miss the call? Check out the Power Apps Community Call here.
We are excited to announce the Power Apps Super Users!
Check out our new profile badges recognizing authored solutions!