cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to Update the Sharepoint List column data from Power APP to SharePoint List

 

Spoiler

Hi Team,
In one of my power App, I created an Auto-generated Data field which automatically reflects the Employee’s Supervisor Name and his/her Job Title by office365 formulas. But the Sharepoint list also have the same columns with “People” dataType

Data entered generated in the App are not getting saved in the Sharepoint list columns.

What needs to be done in order to update the Text Data fields from Power app New Form to Sharepoint List?

Below are the screenshots for your reference.

 

 

I will be very thankful to get any response or guidance on my query.

Thank you Power App Team

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: How to Update the Sharepoint List column data from Power APP to SharePoint List

Hi@BhagyaPlus,

My mistake, if there is an error message, share it with me as well. 

I could not reproduce your issue, here are some possible error you could check for reference.

  1. In general, you can replace IsBlank(Radio3) with IsBlank(Radio3.Selected.Value)
  2. How you set the Default property of the TextInput corresponding to the supervisor and supervisor job title. So as the Update property of the corresponding data card to the supervisor and supervisor job title?
  3. Make sure that you have connected to your SP list and Office365Users.

Here is my scenario, you could check for reference.

Set the Items property of the ComboBox corresponding to the Employee column as below:

 

Choices([@'0922'].Employee)

 

Set the Update property of the DataCard of the corresponding to the Employee column as below:

 

DataCardValue6.Selected

 

Set the Default property of the TextInput3 corresponding to the Supervisor column as below:

 

Office365Users.Manager(DataCardValue6.Selected.Email).DisplayName

 

Set the Update property of the DataCard of the corresponding to the Supervisor column as below:

 

{
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            DisplayName: TextInput3.Text,
            Claims: "i:0#.f|membership|" & Lower(Office365Users.Manager(DataCardValue6.Selected.Email).Mail),
            Department: "",
            Email: Office365Users.Manager(DataCardValue6.Selected.Email).Mail,
            JobTitle: "",
            Picture: ""
        }

 

Set the Default property of the DataCardValue5 corresponding to the EmployeeJobTitle column as below:

 

First(Office365Users.SearchUser({searchTerm:DataCardValue6.Selected.DisplayName})).JobTitle

 

Set the Update property of the DataCard of the corresponding to the EmployeeJobTitle column as below:

 

DataCardValue5.Text

 

Please do compare the above formula with your related formula within your App.

You could try to modify your formula as below:

If(
IsBlank(DataCardValue46.Selected.Value) || IsBlank(DataCardValue47.Selected.Value) || IsBlank(DataCardValue2.Text) || IsBlank(DataCardValue4.SelectedDate) ||
IsBlank(DataCardValue5.SelectedDate) || IsBlank(DataCardValue6.SelectedDate) || IsBlank(DataCardValue9.Selected.Value) || IsBlank(Radio1.Selected.Value) || IsBlank(Radio2.Selected.Value) ||
IsBlank(Radio3.Selected.Value) || IsBlank(Radio2_2.Selected.Value) || IsBlank(Radio2_3.Selected.Value) || IsBlank(Radio2_4.Selected.Value) || IsBlank(Radio2_5.Selected.Value) || IsBlank(Radio2_6.Selected.Value) || IsBlank(Radio2_7.Selected.Value) || IsBlank(Radio2_8.Selected.Value) ||
IsBlank(Radio2_9.Selected.Value) || IsBlank(Radio2_10.Selected.Value) || IsBlank(Radio2_11.Selected.Value) || IsBlank(Radio2_12.Selected.Value) || IsBlank(Radio2_23.Selected.Value) || IsBlank(Radio2_14.Selected.Value) || IsBlank(Radio2_15.Selected.Value) ||
IsBlank(Radio2_16.Selected.Value) || IsBlank(Radio2_17.Selected.Value) || IsBlank(Radio2_18.Selected.Value) || IsBlank(Radio2_19.Selected.Value) || IsBlank(Radio2_20.Selected.Value) || IsBlank(Radio2_21.Selected.Value) || IsBlank(Radio2_22.Selected.Value) ,
Navigate(
Retry,
ScreenTransition.Cover
),
SubmitForm(Form1) &&
Navigate(
'Thank You',
ScreenTransition.Cover
)
)

Best Regards,

Qi

View solution in original post

5 REPLIES 5
Highlighted
Microsoft
Microsoft

Re: How to Update the Sharepoint List column data from Power APP to SharePoint List

Hi@BhagyaPlus,

Based on the issue that you mentioned, do you want to save data from Text fields within PowerApps to the SharePoint Person column?

Could you please share a bit more about the scenario, do you mean:

  1.  The employee's supervisor entered within the TextInput has the corresponding Person column in your SP list?
  2.  Patch employee's supervisor and supervisor's job title to the corresponding Person column?

If my understanding is correct, I can tell you that there is no way to patch the job title from TextInput to the Person column currently.

The Person column only supports to display DisplayName and Email. Of course, you can display the manager's job title within PowerApps, but you could not save this string value to the Person column. 

As an alternative solution, I advise you to replace the Person columns corresponding to supervisor and supervisor's job title with two Text columns. The reflected Employee’s Supervisor Name and his/her Job Title by office365 formulas could be patched to Text columns in the SP list.

I have a test on my side, please take a try as below.

Set the Items property of the ComboBox corresponding to the Employee column as below:

 

Choices([@'0922'].Employee)

 

Set the Default property of the TextInput3 corresponding to the Supervisor column as below:

 

Office365Users.Manager(DataCardValue6.Selected.Email).DisplayName

 

Set the Default property of the TextInput4 corresponding to the SupervisorJobTitle column as below:

 

Office365Users.Manager(DataCardValue6.Selected.Email).JobTitle

 

Set the OnSelect property of the save Button as below:

 

Patch(
    '0922',
    LookUp(
        '0922',
        ID = 2
    ),
    {
        Supervisor: TextInput3.Text,
        SupervisorJobTitle: TextInput4.Text
    }
)

 

Note: The DataCardValue6 represents the ComboBox corresponding to the Employee column.

Best Regards,

Qi

Highlighted
Helper I
Helper I

Re: How to Update the Sharepoint List column data from Power APP to SharePoint List

Yes, @v-qiaqi-msft,

Your understanding is correct.I want to patch the supervisor name to the corresponding people column (in SP List which I built earlier) and the job title of the employee to the Single text column in the SP site.

 

I saw your formula for the Submit button.

But my submit button already has a formula i.e., if form has errors show success screen else show Error screen. Please advice

 

Thanks

 

 

Highlighted
Microsoft
Microsoft

Re: How to Update the Sharepoint List column data from Power APP to SharePoint List

Hi@BhagyaPlus,

If you use a form to submit the data, you could use the SubmitForm() function directly?

Please provide your formula within the Submit Button.

You can put the Patch() formula and If() formula together by using a separator ";". The following is my formula:

 

Patch(
    '0922',
    Defaults('0922'),
    {
        Supervisor: {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            DisplayName: TextInput3.Text,
            Claims: "i:0#.f|membership|" & Lower(Office365Users.Manager(DataCardValue6.Selected.Email).Mail),
            Department: "",
            Email: Office365Users.Manager(DataCardValue6.Selected.Email).Mail,
            JobTitle: "",
            Picture: ""
        },
        ManagerJobTitle: DataCardValue10.Text
    }
)

 

Note: The DataCardValue6 represents the ComboBox corresponding to the Employee column. The DataCardValue10 represents the TextInput corresponding to the 'ManagerJobTitle' column.

Best Regards,

Qi

 

Highlighted
Helper I
Helper I

Re: How to Update the Sharepoint List column data from Power APP to SharePoint List

HI @v-qiaqi-msft 

Thank you for looking into my query.

The formula behind my submit Button is as below.

 

If(
IsBlank(DataCardValue46.Selected.Value) || IsBlank(DataCardValue47.Selected.Value) || IsBlank(DataCardValue2.Text) || IsBlank(DataCardValue4.SelectedDate) ||
IsBlank(DataCardValue5.SelectedDate) || IsBlank(DataCardValue6.SelectedDate) || IsBlank(DataCardValue9.Selected.Value) || IsBlank(Radio1) || IsBlank(Radio2) ||
IsBlank(Radio3) || IsBlank(Radio2_2) || IsBlank(Radio2_3) || IsBlank(Radio2_4) || IsBlank(Radio2_5) || IsBlank(Radio2_6) || IsBlank(Radio2_7) || IsBlank(Radio2_8) ||
IsBlank(Radio2_9) || IsBlank(Radio2_10) || IsBlank(Radio2_11) || IsBlank(Radio2_12) || IsBlank(Radio2_23) || IsBlank(Radio2_14) || IsBlank(Radio2_15) ||
IsBlank(Radio2_16) || IsBlank(Radio2_17) || IsBlank(Radio2_18) || IsBlank(Radio2_19) || IsBlank(Radio2_20) || IsBlank(Radio2_21) || IsBlank(Radio2_22) ,
Navigate(
Retry,
ScreenTransition.Cover
),
SubmitForm(Form1);
Navigate(
'Thank You',
ScreenTransition.Cover
)
)

 

Thank You

 

Highlighted
Microsoft
Microsoft

Re: How to Update the Sharepoint List column data from Power APP to SharePoint List

Hi@BhagyaPlus,

My mistake, if there is an error message, share it with me as well. 

I could not reproduce your issue, here are some possible error you could check for reference.

  1. In general, you can replace IsBlank(Radio3) with IsBlank(Radio3.Selected.Value)
  2. How you set the Default property of the TextInput corresponding to the supervisor and supervisor job title. So as the Update property of the corresponding data card to the supervisor and supervisor job title?
  3. Make sure that you have connected to your SP list and Office365Users.

Here is my scenario, you could check for reference.

Set the Items property of the ComboBox corresponding to the Employee column as below:

 

Choices([@'0922'].Employee)

 

Set the Update property of the DataCard of the corresponding to the Employee column as below:

 

DataCardValue6.Selected

 

Set the Default property of the TextInput3 corresponding to the Supervisor column as below:

 

Office365Users.Manager(DataCardValue6.Selected.Email).DisplayName

 

Set the Update property of the DataCard of the corresponding to the Supervisor column as below:

 

{
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            DisplayName: TextInput3.Text,
            Claims: "i:0#.f|membership|" & Lower(Office365Users.Manager(DataCardValue6.Selected.Email).Mail),
            Department: "",
            Email: Office365Users.Manager(DataCardValue6.Selected.Email).Mail,
            JobTitle: "",
            Picture: ""
        }

 

Set the Default property of the DataCardValue5 corresponding to the EmployeeJobTitle column as below:

 

First(Office365Users.SearchUser({searchTerm:DataCardValue6.Selected.DisplayName})).JobTitle

 

Set the Update property of the DataCard of the corresponding to the EmployeeJobTitle column as below:

 

DataCardValue5.Text

 

Please do compare the above formula with your related formula within your App.

You could try to modify your formula as below:

If(
IsBlank(DataCardValue46.Selected.Value) || IsBlank(DataCardValue47.Selected.Value) || IsBlank(DataCardValue2.Text) || IsBlank(DataCardValue4.SelectedDate) ||
IsBlank(DataCardValue5.SelectedDate) || IsBlank(DataCardValue6.SelectedDate) || IsBlank(DataCardValue9.Selected.Value) || IsBlank(Radio1.Selected.Value) || IsBlank(Radio2.Selected.Value) ||
IsBlank(Radio3.Selected.Value) || IsBlank(Radio2_2.Selected.Value) || IsBlank(Radio2_3.Selected.Value) || IsBlank(Radio2_4.Selected.Value) || IsBlank(Radio2_5.Selected.Value) || IsBlank(Radio2_6.Selected.Value) || IsBlank(Radio2_7.Selected.Value) || IsBlank(Radio2_8.Selected.Value) ||
IsBlank(Radio2_9.Selected.Value) || IsBlank(Radio2_10.Selected.Value) || IsBlank(Radio2_11.Selected.Value) || IsBlank(Radio2_12.Selected.Value) || IsBlank(Radio2_23.Selected.Value) || IsBlank(Radio2_14.Selected.Value) || IsBlank(Radio2_15.Selected.Value) ||
IsBlank(Radio2_16.Selected.Value) || IsBlank(Radio2_17.Selected.Value) || IsBlank(Radio2_18.Selected.Value) || IsBlank(Radio2_19.Selected.Value) || IsBlank(Radio2_20.Selected.Value) || IsBlank(Radio2_21.Selected.Value) || IsBlank(Radio2_22.Selected.Value) ,
Navigate(
Retry,
ScreenTransition.Cover
),
SubmitForm(Form1) &&
Navigate(
'Thank You',
ScreenTransition.Cover
)
)

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,837)