cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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 ListGroups List
Members List (with a content type and a managed metadata field)Members 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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,604)