web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using the o365users di...
Power Apps
Answered

Using the o365users direct report canlt assign planner task

(0) ShareShare
ReportReport
Posted on by 27

Hi

 

I am trying to create an app that allows me to assign tasks to my direct reports. I can successfully assign a task if I use the search users function however I would rather just have a dropdown list of my direct reports only (which i can do using the o365users direct report function) However when I try to assign a task using the selected value from the direct report dropdown it states it needs a text value which I can't seem to do for some reason.

 

Any help would be appreciated

 

Thanks

 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @chrisuk01 ,

     

    Can you please share a little more context? What control/code requires text?

  • chrisuk01 Profile Picture
    27 on at

    I've taken the powerapp template app "Power Apps Training for Office_1321.

     

    On the Planner screen I have changed the Assign to filed to be a dropdown menu and using the o365usersdirectreports to populate the items.

     

    Hope this helps.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @chrisuk01 ,

     

    Sorry, but I'm not familiar with how that template is built. I assume there's some Assign or Submit button on the planner screen. Can you please share the OnSelect property of that?

  • chrisuk01 Profile Picture
    27 on at

    I have various fields as per screenshot below

     

    chrisuk01_0-1660391029729.png

     

    The Assign to field is a dropdown box with the following formula: Office365Users.DirectReports(User().Email).Id

     

    When putting the formula into the onselect for the button:

     

    UpdateContext(
    { SavingStatePrompt: "Task is saving." }
    );
    UpdateContext(
    {
    NewTask: Planner.CreateTask(
    DropdownPlannerPlan.SelectedText.id,
    TextInputPlannerTaskName.Text,
    {
    bucketId: DropdownPlannerBucket.SelectedText.id,
    dueDateTime: DatePickerPlannerDueDate.SelectedDate,
    assignments: dropdownSelectedPerson
    }
    )
    }
    );
    UpdateContext(
    { StartTaskCreatedCallback: true }
    )"

     

    "

     

    The line highlighted in red is the issue. I have tried adding .ID and .selectedtext.id amongst other things to the end of it but it doesn't like it hence my issue.

    The formula states:

    chrisuk01_1-1660391358918.png

     

    Thanks. Hope this gives you the info needed 🙂

     

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @chrisuk01 ,

     

    Can you replace DropDownSelectedPerson.SelectedText.id with DropDownSelectedPerson.Selected.id? The SelectedText property is deprecated and should not be used anymore anyhow.

  • chrisuk01 Profile Picture
    27 on at

    Thanks. but still get the exact same error it expects a text type but you're using an error type.

  • chrisuk01 Profile Picture
    27 on at

    Just some other observations that may or may not help.

     

    If I use createTaskv3 I get the following error for the same line:  invalid argument type (record) expecting a text value

     

    If I use createTaskv2 I get the exact same error as the original error.

     

    For some reason it isn;t liking the value I am passing it from the dropwdownselectedperson field. Its a record and it wasnt'sd it in txt is how it appears to me but not sure how.

     

  • Verified answer
    chrisuk01 Profile Picture
    27 on at

    I changed it from ID to DropDownSelectedPerson.Selected.userprincipalname and this looks to have worked! 🙂

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @chrisuk01 ,

     

    Great to read the issue has been resolved. Can you please mark the post(s) that have the solution for the benefit of the community?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard