cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Combo Box populated with user O365 not saved in Sharepoint List

I have some problem with the Combo Box.

 

Situation:

- Sharepoint List with two colums with person (no multiple selection and no groups)

- first colum is a person and second is his manager

- this colums are mandatory (defined in Sharepoint with oders colums)

- App created from zero in Powerapps with the data selected at the beginning of creation

 

Problem:

1) in the app I try to create a new entry

2) the person mandatory field (a person and his manager) are automatic populated

   - first field with the actual user as default value

   - second field with the manager from the first field

3) all default value's are placed and are visible in the combo box (still work if I change the person)

4) if I save the new entry there is no error message

5) but the new entry in Sharepoint has all the value's except for the two person colums

6) if I let chose the user the two field it works without problem, but the I have a problem because the user fill the forms with any value (no control)

 

It's a bug? Or only my missconfiguration?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @frigi,

Could you please share a bit more about your issue within your app?

Do you mean that the default values within the two Person type fields could not be saved back to your SP list?

Further, could you please show more details about the default values you have set for the two Person type fields within your app?

 

I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following workaround:6.JPG

 

7.JPGSet the DefaultSelectedItems property of the Combo box control (DataCardValue9) within the Executor Data card (First Person type column) to following formula:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: User().FullName,
        Claims: "i:0#.f|membership|" & User().Email,
        Email: User().Email
    },
    Parent.Default
)

Set the DefaultSelectedItems property of the Combo box control within the Manager Data card (Second Person type column) to following formula:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: Office365Users.Manager(DataCardValue9.Selected.Email).DisplayName,
        Claims: "i:0#.f|membership|" & Office365Users.Manager(DataCardValue9.Selected.Email).Mail,
        Email: Office365Users.Manager(DataCardValue9.Selected.Email).Mail
    },
    Parent.Default
)

Note: I set the current login user as the default value within the First Person type field (on my side, it is Executor).

The GIF screenshot as below:Test1.gif

 

More details about setting a default value for the Person type column of SP list, please check and see the following blog:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @frigi,

Could you please share a bit more about your issue within your app?

Do you mean that the default values within the two Person type fields could not be saved back to your SP list?

Further, could you please show more details about the default values you have set for the two Person type fields within your app?

 

I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following workaround:6.JPG

 

7.JPGSet the DefaultSelectedItems property of the Combo box control (DataCardValue9) within the Executor Data card (First Person type column) to following formula:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: User().FullName,
        Claims: "i:0#.f|membership|" & User().Email,
        Email: User().Email
    },
    Parent.Default
)

Set the DefaultSelectedItems property of the Combo box control within the Manager Data card (Second Person type column) to following formula:

If(
    EditForm1.Mode=FormMode.New,
    {
        DisplayName: Office365Users.Manager(DataCardValue9.Selected.Email).DisplayName,
        Claims: "i:0#.f|membership|" & Office365Users.Manager(DataCardValue9.Selected.Email).Mail,
        Email: Office365Users.Manager(DataCardValue9.Selected.Email).Mail
    },
    Parent.Default
)

Note: I set the current login user as the default value within the First Person type field (on my side, it is Executor).

The GIF screenshot as below:Test1.gif

 

More details about setting a default value for the Person type column of SP list, please check and see the following blog:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi,

I have tried above approach and it was working. 

 

Instead of populating the user info, i have tried to filter office365user.searchuser filter operations to filter user by jobtitle. 

Item - 

Filter(Office365Users.SearchUser({ searchTerm: DatacardValue6_1.searchtext }), JobTitle = "Associate")

 

DatacardValue6_1.searchtext - My Combo Box

 

On the run mode, it was showing up users with filter job title. But when i select the particular user and tried to save. It was not getting to the sharePoint list. Any assistance will be really appreciated. All the others fields are getting saved. 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,345)