cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeysicca
Level: Powered On

Gallery for Repeating Section with a Managed Metadata field not working properly

Hi,

 

I have a 2 lists that are used in one powerapps form. One of the lists has a content type that I created with a managed metadata. I created an example below:

 

Groups list.PNGGroups List
Members list.pngMembers List (with a content type and a managed metadata field)

I created a form that I connected the two. In a group, there can be 1 or more members. So this is my form:

groups form.png

we have the groups section where the details are saved to the Groups list and the members section where the details are saved in the Members list. The members section is a gallery where you can add multiple members. When clicking the Add Member button, it is supposed to add one duplicate section for the student information. However, when I clicked it, it adds more than 1 duplicate just like this:

 

Groups form repeats more than 1.PNG

 

 

The formula for Add Member button is

 Add Member On Select.png

The LineDegree is the initialization of the Degree field because it is a Managed Metadata. While the Degree combo box has this formula to save it in the collection:

 

Degree On Change.png

 

Thanks for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Gallery for Repeating Section with a Managed Metadata field not working properly

Hi @jeysicca ,

Could you please share a bit more about your issue?

Do you mean that it would create more than one duplicate section rather than one duplicate section within your Gallery when you click the "Add Member" button?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:2.JPG

 

3.JPG

Set the OnSelect property of the "Add Member" button to following:

Collect(
        MembersCollection,
        {
            LineTitle: "",
            LineYear: {
                Value: ""
            },
            LineDegree: {
                '@odata.type':"",
                TermGuid: "",
                WssId:"",
                Label: "",
                Path:"",
                Value: ""
            }
        }
)

Please check the following GIF screenshot for more details:Test.gif

 

Please check if you used another formula to add record into your MembersCollection. Also please check if you have typed your Collect() formula in other place of your app except the "Add Member" button.

 

In addition, please also consider take a try to add a Index column within your MembersCollection to act as Row Index. Please consider modify the Collect formula within the "Add Member" button as below:

Collect(
        MembersCollection,
        {
Index: CountRows(MembersColelction) + 1, LineTitle: "", LineYear: { Value: "" }, LineDegree: { '@odata.type':"", TermGuid: "", WssId:"", Label: "", Path:"", Value: "" } } )

Set the OnVisible property of the current screen to following:

Clear(MembersCollection);
Collect(
MembersCollection,
{
Index: CountRows(MembersColelction) + 1,
LineTitle: "",
LineYear: { Value: "" },
LineDegree: { '@odata.type':"", TermGuid: "", WssId:"", Label: "", Path:"", Value: "" }
}
)

Then please use UpdateIf() function to update records in your MembersCollection instead of Patch function. Modify your formula as below:

UpdateIf(
        MembersCollection,
Index = ThisItem.Index, { LineDegree: { '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy", TermGuid: DegreeComboBox.Selected.TermGuid, WssId: DegreeComboBox.Selected.WssId, Label: DegreeComboBox.Selected.Label, Path: DegreeComboBox.Selected.Path, Value: DegreeComboBox.Selected.Value } } )

Please take a try with above solution, then check if the issue is solved.

 

If the issue still exists, please consider re-create a new app, then take a try with above solution I provided, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Gallery for Repeating Section with a Managed Metadata field not working properly

Hi @jeysicca ,

Could you please share a bit more about your issue?

Do you mean that it would create more than one duplicate section rather than one duplicate section within your Gallery when you click the "Add Member" button?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:2.JPG

 

3.JPG

Set the OnSelect property of the "Add Member" button to following:

Collect(
        MembersCollection,
        {
            LineTitle: "",
            LineYear: {
                Value: ""
            },
            LineDegree: {
                '@odata.type':"",
                TermGuid: "",
                WssId:"",
                Label: "",
                Path:"",
                Value: ""
            }
        }
)

Please check the following GIF screenshot for more details:Test.gif

 

Please check if you used another formula to add record into your MembersCollection. Also please check if you have typed your Collect() formula in other place of your app except the "Add Member" button.

 

In addition, please also consider take a try to add a Index column within your MembersCollection to act as Row Index. Please consider modify the Collect formula within the "Add Member" button as below:

Collect(
        MembersCollection,
        {
Index: CountRows(MembersColelction) + 1, LineTitle: "", LineYear: { Value: "" }, LineDegree: { '@odata.type':"", TermGuid: "", WssId:"", Label: "", Path:"", Value: "" } } )

Set the OnVisible property of the current screen to following:

Clear(MembersCollection);
Collect(
MembersCollection,
{
Index: CountRows(MembersColelction) + 1,
LineTitle: "",
LineYear: { Value: "" },
LineDegree: { '@odata.type':"", TermGuid: "", WssId:"", Label: "", Path:"", Value: "" }
}
)

Then please use UpdateIf() function to update records in your MembersCollection instead of Patch function. Modify your formula as below:

UpdateIf(
        MembersCollection,
Index = ThisItem.Index, { LineDegree: { '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy", TermGuid: DegreeComboBox.Selected.TermGuid, WssId: DegreeComboBox.Selected.WssId, Label: DegreeComboBox.Selected.Label, Path: DegreeComboBox.Selected.Path, Value: DegreeComboBox.Selected.Value } } )

Please take a try with above solution, then check if the issue is solved.

 

If the issue still exists, please consider re-create a new app, then take a try with above solution I provided, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

jeysicca
Level: Powered On

Re: Gallery for Repeating Section with a Managed Metadata field not working properly

This worked. I applied this on my form. It has a side effect on my form tho. Thank you so much.


@v-xida-msft wrote:

Hi @jeysicca ,

Could you please share a bit more about your issue?

Do you mean that it would create more than one duplicate section rather than one duplicate section within your Gallery when you click the "Add Member" button?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:2.JPG

 

3.JPG

Set the OnSelect property of the "Add Member" button to following:

Collect(
        MembersCollection,
        {
            LineTitle: "",
            LineYear: {
                Value: ""
            },
            LineDegree: {
                '@odata.type':"",
                TermGuid: "",
                WssId:"",
                Label: "",
                Path:"",
                Value: ""
            }
        }
)

Please check the following GIF screenshot for more details:Test.gif

 

Please check if you used another formula to add record into your MembersCollection. Also please check if you have typed your Collect() formula in other place of your app except the "Add Member" button.

 

In addition, please also consider take a try to add a Index column within your MembersCollection to act as Row Index. Please consider modify the Collect formula within the "Add Member" button as below:

Collect(
        MembersCollection,
        {
Index: CountRows(MembersColelction) + 1, LineTitle: "", LineYear: { Value: "" }, LineDegree: { '@odata.type':"", TermGuid: "", WssId:"", Label: "", Path:"", Value: "" } } )

Set the OnVisible property of the current screen to following:

Clear(MembersCollection);
Collect(
MembersCollection,
{
Index: CountRows(MembersColelction) + 1,
LineTitle: "",
LineYear: { Value: "" },
LineDegree: { '@odata.type':"", TermGuid: "", WssId:"", Label: "", Path:"", Value: "" }
}
)

Then please use UpdateIf() function to update records in your MembersCollection instead of Patch function. Modify your formula as below:

UpdateIf(
        MembersCollection,
Index = ThisItem.Index, { LineDegree: { '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedTaxonomy", TermGuid: DegreeComboBox.Selected.TermGuid, WssId: DegreeComboBox.Selected.WssId, Label: DegreeComboBox.Selected.Label, Path: DegreeComboBox.Selected.Path, Value: DegreeComboBox.Selected.Value } } )

Please take a try with above solution, then check if the issue is solved.

 

If the issue still exists, please consider re-create a new app, then take a try with above solution I provided, then check if the issue is solved.

 

Best regards,


 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 359 members 4,343 guests
Please welcome our newest community members: