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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch sharepoint list ...
Power Apps
Answered

Patch sharepoint list by sourceing data from another sharepoint list with some additional calculated columns

(0) ShareShare
ReportReport
Posted on by 8

Hi Folks,

 

I am stuck in my thoughts on how to proceed with the solutioning of this problem. Please help out here.

I have two SharePoint lists

Source

 

Tapasqwet_1-1694057910477.png

 

Target

Tapasqwet_2-1694058015885.png

 

If you notice, target has same columns has source with 2 more additional columns.

manual-input will contain user input value and CalcCol will contain a calculated value.

 

The requirement is to create a power apps which will filter items based on title from reddit-source and show it in a gallery , then take user input and show dynamically the calculated value.

Once the user likes what he/she sees, then when they press submit button, the data should patch to reddit-target.

Below is what I created in PowerApps

Enabled modern controls
Took a model control drop down , Linked with the code

Tapasqwet_3-1694058065373.png

Then took a blank vertical gallery , added modern text input in view mode except the third column as it will be in edit mode for user input.

The first two columns are linked directly to source thru thisitem.column name, 2nd one is standalone and 4th columns is just concatenate from first three columns

Tapasqwet_4-1694058288461.png

I am not sure on how to write the patch function which will only take first and 3rd column (as 2nd column didn't had any user input , we need to ignore that row) and patch to the target sharepoint.

Thanks for reading this thru.

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Tapasqwet,

    Do you want to patch calculated result based on Title and Num to CalcCol column in target column?

     

    I assume that you want to pacth all the items from gallery to target list, please add a save button and set its OnSelect as below:

    ForAll(Gallery.AllItems,
    Patch(Targetlist,
    Defaults(Targetlist),
    {
    Title:TextInput_Title.Value,
    Num:TextInput_num.Value,
    CalCol:TextInput_CalCol.Value//Here is the calcaulation result based on first and third column
    }
    )
    )
  • Tapasqwet Profile Picture
    8 on at

    Thank you Qi. Let me try this out. But how to filter out the records from patch which do not have any manual input ? We do not want to patch that record as it is not used by user.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Tapasqwet,

    Modify as below:

    ForAll(Filter(Gallery.AllItems,!IsBlank(TextInput_ManuallyInput.Value)),
    Patch(Targetlist,
    Defaults(Targetlist),
    {
    Title:TextInput_Title.Value,
    Num:TextInput_num.Value,
    ManuallyInput:TextInput_ManuallyInput.Value
    CalCol:TextInput_CalCol.Value//Here is the calcaulation result based on first and third column
    }
    )
    )
  • Tapasqwet Profile Picture
    8 on at

    It worked perfect. Only issue now is it is creating duplicates for every patch , i will try to figure out a code which will overwrite as long as the keys are same. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard