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

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

View solution in original post

2 REPLIES 2
JayMagness
Super User
Super User

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

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (70,088)