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 / How to set as Default ...
Power Apps
Unanswered

How to set as Default a specific record (User/Person) in a choices field?

(0) ShareShare
ReportReport
Posted on by 169

Hi all,

 

I need to set as default a specific user (Person field in Sharepoint) in a choices field in my approvals power app.
Until now, the field searches for all company's Office 365 users, but I need to change it in order to set a specific person as approver.

Any help would be greatly appreciated.

Categories:
I have the same question (1)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Iro_ 

    If you are using Office365 for your user records in your combobox (assuming combobox) then you will need to convert to a SharePoint user record.

    However, I am not clear on what you mean by "set as default"?  Can you expand on that more and your scenario? 

  • Morgan78 Profile Picture
    169 on at

    Hello @RandyHayes ,

     

    Yes, I mean I want to lock the field (DisplayMode.Disabled), so that users will not be able to change the approver Person (meaning the user I will have already set as approver).

    Example:

    Iro__0-1617980271411.png


    I could just write the approver's name, but I need the whole user's record (to use it later in a flow)

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Iro_ 

    So, if you already have a value in that column and you just don't want it to change, then set the DisplayMode property of the control to evaluate the fact that there is already a value.

    A couple of questions:

    1) Is this in an EditForm or freestanding?

    2) What is the DefaultSelectedItems property of the control?

     

  • Morgan78 Profile Picture
    169 on at

    It is in an edit form.

    Well, that is actually my question. I tried to use DefaultSelectedItems like this: { Value: "Name Lastname" } 
    which is obviously wrong. I don't know what I should put there since it is a record... Where do I get that info? Should I use the email of the approver or something else?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Iro_ 

    So you have two questions then? - 1: how to set the DefaultSelectedItems and 2: how to make it disabled if it has a value

     

    If so, then the next question is...why are you using Office 365 in the Items property of the combobox?  Is there a specific need for that source rather than the traditional SharePoint person column choices?

     

  • Morgan78 Profile Picture
    169 on at

    I use the Sharepoint person column choices because, until recently, users could select their approver. There was no 'default' approver, it could be any user. I guess that now I can create a new approver text field and delete the old one.

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Iro_ 

    So, the better choice is to have a Person Column in your list.  Then in your EditForm, you can simply add that field to it and everything will already be set for you.

    The only thing you will need to do then is to set the DisplayMode of the control based on if there is a person assigned or not.

       If(IsBlank(Parent.Default), Edit, Disabled)

     

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard