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 / Invalid value for para...
Power Apps
Answered

Invalid value for parameter 'userid'

(0) ShareShare
ReportReport
Posted on by 302

Hi there.  I have created an org chart that has a galMain gallery and a galDirectReports gallery.  The user in the main gallery will show his direct reports in the galDirectreports gallery.  Working great but every time I open the org chart, I get the error below. 

Timm1_0-1679414972197.png

 

The Direct Reports formula is  SortByColumns(Office365Users.DirectReports(galMain.Selected.UserPrincipalName),"DisplayName",SortOrder.Ascending)

 

The GalMain formula is 

Filter(Office365Users.SearchUser({searchTerm:txtEmployeeName.Text}),IsBlank(Department)= false,IsBlank(JobTitle)= false, AccountEnabled=true)

 

I have tried researching the If(!isBlank formulas but I can't seem to get it to work with my formula.  Any Suggestion on how to get rid of this error?  

 

Thank you!

Tim 

 

Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Timm1 ,

     

    Please try below formula:

    If(IsBlank(galMain.Selected.UserPrincipalName),Blank(),SortByColumns(Office365Users.DirectReports(galMain.Selected.UserPrincipalName),"DisplayName",SortOrder.Ascending))

     

    Best regards,

  • Timm1 Profile Picture
    302 on at

    Yes yes yes!  That fixed it.  Thank you very much! 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard