cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Foxzor
Helper III
Helper III

Merge two sharepoint date with form

Hello,

 

I have a Sharepoint list1 what have two choices columns -> Projects & Part number. The powerapps shows these with drop-down field in form. This form generated from the Sharepoint list1.

 

I have another Sharepoint list2 what have also two columns with the same name than above->Projects & Part number. 

 

How to merge/connect these two sharepoint list in powerapps form that if I would like to select Projects in the form (what generates from Sharepoint list1)the selected items load from the Sharepoint list2?

 

Edit: I was able to manage that the Project and Part number are loading from the sharepoint list2 in the form from Sharepoint list1 BUT if I submit this form the Project and Part number did not save into the new sharepoint list(1) items.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Foxzor,

Could you please share a bit more about the scenario, how you combine Projects & Part number from the Sharepoint list1 and Sharepoint list2?

I guess that you set the DataSource property of the form as the Sharepoint list1 or Sharepoint list2, so it only save data to Sharepoint list1 or Sharepoint list2.

I think you should add a new edit form and set the DataSource property as the sharepoint list(1). At the same time, set cascading Combo Boxes using the Sharepoint list1 or Sharepoint list2.

For example, may be Sharepoint list1 has different relationships between Projects and Part number from the Sharepoint list2, so you could combine them with cascading Combo Boxes.

I agree with @JayMagness  that a collection to be populated with the cascading Combo Boxes would be great.

Add a Button and set OnSelect as below:

ClearCollect(
    C2,
    ShowColumns(
        AddColumns(
            ClearCollect(
                C1,
                SPList1
            ),
            "NewPro",
            Projects.Value,
            "NewPart",
            Partnumber.Value
        ),
        "NewPart",
        "NewPro"
    )
);
ClearCollect(
    C4,
    ShowColumns(
        AddColumns(
            ClearCollect(
                C3,
                SPList2
            ),
            "NewPro",
            Projects.Value,
            "NewPart",
            Partnumber.Value
        ),
        "NewPart",
        "NewPro"
    )
);
ClearCollect(
    C5,
    C2,
    C4
)

Add an edit form and set the DataSource as :

'sharepoint list(1)'

Set the first Combo Box:

Distinct(C5,NewPro)

Set the second Combo Box:

Filter(C5,NewPro=ComboBox1.Selected.Result).NewPart

Once you submit form, you could save the results to your sharepoint list(1)

Hope it could help.

Regards,

Qi

Best Regards,
Qi

View solution in original post

2 REPLIES 2
JayMagness
Solution Specialist
Solution Specialist

Hi,

 

Have you tried ClearCollect (Collect, Clear, and ClearCollect functions - Power Apps | Microsoft Docs)?

 

You could use ClearCollect(L1,List2);ClearCollect(L2,List2),ClearCollect(L99,L1,L2)

then have the dropdown source look to L99 in memory....

 

I do this a bunch with legal systems

 

Jay

 

 

v-qiaqi-msft
Community Support
Community Support

Hi @Foxzor,

Could you please share a bit more about the scenario, how you combine Projects & Part number from the Sharepoint list1 and Sharepoint list2?

I guess that you set the DataSource property of the form as the Sharepoint list1 or Sharepoint list2, so it only save data to Sharepoint list1 or Sharepoint list2.

I think you should add a new edit form and set the DataSource property as the sharepoint list(1). At the same time, set cascading Combo Boxes using the Sharepoint list1 or Sharepoint list2.

For example, may be Sharepoint list1 has different relationships between Projects and Part number from the Sharepoint list2, so you could combine them with cascading Combo Boxes.

I agree with @JayMagness  that a collection to be populated with the cascading Combo Boxes would be great.

Add a Button and set OnSelect as below:

ClearCollect(
    C2,
    ShowColumns(
        AddColumns(
            ClearCollect(
                C1,
                SPList1
            ),
            "NewPro",
            Projects.Value,
            "NewPart",
            Partnumber.Value
        ),
        "NewPart",
        "NewPro"
    )
);
ClearCollect(
    C4,
    ShowColumns(
        AddColumns(
            ClearCollect(
                C3,
                SPList2
            ),
            "NewPro",
            Projects.Value,
            "NewPart",
            Partnumber.Value
        ),
        "NewPart",
        "NewPro"
    )
);
ClearCollect(
    C5,
    C2,
    C4
)

Add an edit form and set the DataSource as :

'sharepoint list(1)'

Set the first Combo Box:

Distinct(C5,NewPro)

Set the second Combo Box:

Filter(C5,NewPro=ComboBox1.Selected.Result).NewPart

Once you submit form, you could save the results to your sharepoint list(1)

Hope it could help.

Regards,

Qi

Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,212)