cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frigi
Level: Powered On

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
Highlighted
Community Support Team
Community Support Team

Re: Combo Box populated with user O365 not saved in Sharepoint List

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.
2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Combo Box populated with user O365 not saved in Sharepoint List

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.
Fafi
Level: Power Up

Re: Combo Box populated with user O365 not saved in Sharepoint List

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Tomorrow, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 216 members 3,114 guests
Please welcome our newest community members: