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 setup connectio...
Power Apps
Answered

How to setup connection with two data sources and fulfill the function like that when type in a number on first data source data , another data source will change too.

(0) ShareShare
ReportReport
Posted on by 96

For example, i want the function like that. if i have two sharepoint list for my data sources. both of them have a colunm NUMBER.

NUM1 for list1, NUM2 for list2. And NUM1 value need user to input. NUM2 value = 20.


When i input 8 in NUM1. Then the NUM2 in list2 will change to 12 automatically.


I also try to use excel online for my data source. And i use excel formula to fulfill this function between two table.

But it seems that powerapps this feature does not supported. Warning by powerapps is atthached.


Best Regards

Dennis

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Dennis_Qiang :

    Do you want to implement the following functions:

    • There are two lists, where the records correspond to each other.

    1.jpg

    • When you modify the value of NUM1 of a record in list1 in your App (assuming that the value is X), the value of Num2 in the record of corresponding list2 will automatically subtract x.

    Could you tell me:

    • How did you modify NUM1 in the app? Form? 
    • Are there fields similar to "primary key" and "foreign key" in the two tables, so that the two tables can be related to each other? (In the picture above, the two tables are related to each other by ID)

    I assume that you modify the value of NUM1 through a form, and the two tables are related by ID (list1.ID = list2.ID)

    I've made a test for your reference:

    My data source(SharePoint List):

    List A

    IDNUM1(number)
    1 
    2 
    3 
    4 

    List B

    IDNUM2(number)
    120
    220
    320
    420

    1\Add a Gallery(Gallery10This gallery is used to select the records we want to display in the form

    Items:

     

     

    'List A'

     

     

    2\Add an edit form(Form6).

    DataSource:

     

     

    'List A'

     

     

    Item:

     

     

    Gallery10.Selected

     

     

    3\Add a button

    OnSelect:

     

     

    SubmitForm(Form6);
    Patch(
     'List B',
     LookUp(
     'List B',
     ID = Gallery10.Selected.ID
     ), /*Find the corresponding record in list2*/
     {
     NUM2: LookUp(
     'List B',
     ID = Gallery10.Selected.ID
     ).NUM2 - Gallery10.Selected.NUM1
     }
    )

     

     

    2.JPG3.JPG

    Best Regards,

    Bof

  • Dennis_Qiang Profile Picture
    96 on at

    Hi Bof,


    If two table related by an choice type column for both list1 and list2.

    And the edit form not base on Gallery.Selected. Base on NewEditForm.


    How to implement this function?


    Thank You!


    B&R

    Dennis

  • v-bofeng-msft Profile Picture
    on at

    Hi @Dennis_Qiang :

    If it is choices type data.The syntax should be:

    list1.choicesfield.Value=list2.choicesfield.Value

    Best Regards,

    Bof

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard