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 / Data Source List (Refe...
Power Apps
Unanswered

Data Source List (Reference Values) ; New Values to a second updated list

(0) ShareShare
ReportReport
Posted on by 15

Hello,

 

I'm stuck on creating this app using a MS list.

 

I uploaded an excel spreadsheet to MS lists via SharePoint named 'Planned Work' with columns labeled 'Date', 'Task', & 'Contactor'. Each of those columns have approximately 50 predetermined values and should not be changed. I have a 2nd list named 'Work Updates' with 3 columns labeled -'* Date', '* Task' & '* Contractor' and have no values yet and should be populated with the entries regularly via an edit, or new type form. 

 

I use the 'Planned Work' values in dropdown allowed values to make the form more user friendly and then also more consistent on the back end in the regularly updated 'Work Updates' list. 

 

The problem I'm facing is exporting the (*Date, *Task, and *Contractor) field entries to my 'Work Updates' List. Both lists are linked data sources to the edit forms on 2 screens. 

 

I attempted the patch function using 2 forms on separate screens, but was kicking back an error when I tried the Patch('Planned Work', defaults('Work Updates').

 

Any help would be appreciated.

 

Thanks,

FrogFace

 

 

Categories:
I have the same question (0)
  • WonderSerota Profile Picture
    80 on at

    Try this patch function. I'm not sure if it's gonna work:

    Patch('Work Updates', Defaults('Work Updates'), {
    '* Date': 'your date value',
    '* Task': 'your task value',
    '* Contractor': 'your contractor value'
    })

    You can replace the 'your date value', 'your task value', and 'your contractor value' with the actual values you want to add to the ‘Work Updates’ list.

  • FrogFace Profile Picture
    15 on at

    Thanks for your quick response, it looks like it would work functionally, but hardcoding the entry each time seems counter productive for a mobile app.

  • v-jefferni Profile Picture
    on at

    Hi @FrogFace ,

     

    Could you please share more details about your scenario? What exactly do you want to achieve with the second list? Do you want to copy all the changes from list1 to list2?

     

    Best regards,

  • FrogFace Profile Picture
    15 on at

    Hi @v-jefferni ,

     

    Attached is an example of my 'Planned Work' list. The columns with an * are the new fields added to the list from Form1 and Form2. I would like to submit the new fields to a separate list named 'Work Updates' other than the 'Planned Work' list. The attachment shows how the data is returned to the 'Planned Work' list when the Patch('Planned Work', Defaults('Planned Work')) formula is used successfully.

     

    Thanks for your help.

  • FrogFace Profile Picture
    15 on at

    Is there a way to solve my issue with a collection or an additional table?

  • v-jefferni Profile Picture
    on at

    Hi @FrogFace ,

     

    The thing is I still cannot understand what you want to achieve. Since the planned work list are the data sources of dropdown, the form should only connect to Work Updates. So, new items will add to Work Updates using Patch function:

    Patch('Work Updates', Defaults('Work Updates'), {
    '* Date': 'your date value',
    '* Task': 'your task value',
    '* Contractor': 'your contractor value'
    })

     

    I cannot find relations of old and * columns from the pdf you attached before. Could you explain it further?

     

    Best regards,

  • Verified answer
    FrogFace Profile Picture
    15 on at

    Hi, @v-jefferni 

    I solved this issue. I created a collection for the new data. I did not know the dropdowns within a form could be tied to a separate data source than the form itself. 

     

    I inserted 3 dropdowns each in a separate dataCard and attached them to a MS List data source. I then connected the form to a collection. This allowed me to use a MS List as a data source and insert the "* New Data" to a separate database (my collection). 

     

    What I need though is to export a collection to excel using onSelect. 

     

    Help with this would be appreciated. 

     

    Thanks, 

  • v-jefferni Profile Picture
    on at

    Hi @FrogFace ,

     

    That's just:

     

    Collect(ExcelTable, collection)

     

    if collection columns are the same as excel table columns.

     

    Best regards,

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard