cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Post Prodigy
Post Prodigy

Getting the User's department using Office365Users.ManagerV2(DataCardValue6.Selected.Email).department and set it as the default value for dropdown will raise this error "Expected Record Value"

I have a dropdown list which contains all the departments inside our AD, then inside our form, i disable the department dropdown and i want to auto populate it with the Office365Users.ManagerV2(DataCardValue6.Selected.Email).department, but when i tried the below i got an error "Expected Record Value":-

 

ddddddddddd.png

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Dual Super User
Dual Super User

@johnjohn123 

 

What is the Items property value for Department dropdown? This is collection of values.

 

Office365Users.ManagerV2(DataCardValue6.Selected.Email).department is a single value. You are trying to place a text value into a table of values. Due to that, you see the error.

 

Give a try with following:

LookUp(<Drop down items property formula>,Value=Office365Users.ManagerV2(DataCardValue6.Selected.Email).department)

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

9 REPLIES 9
happyume
Solution Sage
Solution Sage

The syntax of Office365Users.ManagerV2("abc@domain.com").department is correct and will give you a single line of text.

 

Can you just select DataCardValue6.Selected.Email and confirm that you are getting the email address as expected?

rsaikrishna
Dual Super User
Dual Super User

@johnjohn123 

 

What is the Items property value for Department dropdown? This is collection of values.

 

Office365Users.ManagerV2(DataCardValue6.Selected.Email).department is a single value. You are trying to place a text value into a table of values. Due to that, you see the error.

 

Give a try with following:

LookUp(<Drop down items property formula>,Value=Office365Users.ManagerV2(DataCardValue6.Selected.Email).department)

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

Digital
Impactful Individual
Impactful Individual

Check you if your  formula returns a table value. If that's the case try:

 

First(Office365Users.ManagerV2(DataCardValue6.Selected.Email)).department

 

@rsaikrishna  the items are:-

 

items.png

@Digitalsame error when i used :-

 

First(Office365Users.ManagerV2(DataCardValue6.Selected.Email)).department

@rsaikrishna  i tried this but got an error "Name is not valid":-

 

lookup.png

@rsaikrishnanow i tried this also:-

 

parent.pngwhere i did not get any error... but at the same time no dropdown option will get selected, it will stay blank..

johnjohn123
Post Prodigy
Post Prodigy

@rsaikrishnayour formula worked for me:-

 

parent.png

 

seems the SharePoint dropdown were missing some options.. thanks

StalinPonnusamy
Community Champion
Community Champion

Hi @johnjohn123

 

Set the Default Property of Department Dropdown to

Office365Users.ManagerV2(DataCardValue6.Selected.Email).department

 

StalinPonnusamy_1-1632114457220.png

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,327)