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 / How to pull data from ...
Power Apps
Unanswered

How to pull data from one table but push update a different table?

(0) ShareShare
ReportReport
Posted on by 256

Hello,

 

I have a form with combo boxes that pulls data from one table, but when I save the form, I'd like to update the same fields in another table. 

 

Consider these two tables using Sharepoint List as the datasource:

 

Table1:

Region        VP               Director           Manager

North          Mary               Barbara            Richard

South           Paul               Jim                    Louise

South           Paul               Jim                    Joe

South           Paul               Jim                    Mary

South           Paul               Jim                    Joanne

East              Tom              Sam                   Deborah

...

 

Table2:

Messages      Director         Manager

Item1               Jim                   Louise

Item2               Jim                   Louise

Item3               Jim                   Louise

Item4               Jim                   Joe

Item5               Jim                   Mary

Item6               Barbara            Richard

..

 

 

I have created a form that will allow me to create new entries in Table2. The form consists of multiple combo boxes and text inputs for various other columns along with what is shown above. The datasource for the form is "Table2".  In the form, I have it configured that if I select "Joanne" as the Manager, then the  VP and Director pulldowns will automatically populate their entries from a lookup referencing Table1, so that the user doesn't need to fill that info in by hand.

 

I am doing the automatic population by setting the "Default" and "DefaultSelectedItems" entries for the DataCard as follows:

{Value:LookUp(Table1,Manager=managerDataCardValue.Selected.Result).Director}     for the Director

and

{Value:LookUp(Table1,Manager=managerDataCardValue.Selected.Result).VP}        for the VP

 

However, when I "Save" the form using "SubmitForm(FormName);" Table2 does not write the Director's name or VP's name to the proper fields. It only adds the Manager and the Message (along with all other fields). Both the Director and the VP are blank in Table2.

 

I thought that maybe this might be due to the referencing two datasources, so I created two new datacards on the same form that were combo-boxes mapped to the Director and VP fields in the form. I then set the "Default" value for this entry to match the 

 

VPDataCardValue.Selected.Result

 

This combo-box references Table2 and copies the selected VP from the other combo-box that does a lookup value from Table1, so when the form saves, I thought it would put the data in Table 2, but it did not.

 

Anyone have any thoughts on how best to do this? I am nervous adding columns to an already very large table.

 

Thanks in advance!

 

Categories:
I have the same question (0)
  • galos Profile Picture
    256 on at

    Just wondering if this is even possible? Anyone at least know that?

     

    hoping some smart folks like @WarrenBelz  might come across this!

  • Crys.Dom Profile Picture
    62 on at

    usea a lookup column type in your table 2,  creating a relationship between your table 1 and your table 2. In this way it will be easier to obtain the data from your table 1 and create it in the form of your table 2.

    table 2

    column Director --- type lookup

    Column Manager --- type lookup

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

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

    Hi @galos,

    I found that you have solve the same case here, I will mark here to close this case.

    Thanks for your cooperation.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard