in my app where i WAS using Dataverse I am switching to SP Lists (long story)
in the Onsuccess of my screens form1_1 I have this code
ForAll(
Filter(
Gallery1.AllItems,
Checkbox2_1.Value = true
),
If(
CountRows(
Filter(
ECI_Dies_1,
dienum= Checkbox2_1.Text,
eci_id=SelectedRecordTitle1_1.Text
)
)<1,
Patch(
ECI_Dies_1, Defaults(ECI_Dies_1),
{
dienum:ThisRecord.Checkbox2_1.Text,
eci_id:SelectedRecordTitle1_1.Text,
product:DataCardValue9.SelectedText.Value,
content:DataCardValue4_1.Text,
eci_level:DataCardValue3_1.Text,
trial:Checkbox8.Value,
cavity:DataCardValue1_1.Selected.Value
}
)
)
);
UpdateContext(
{
CurrentItem: Self.LastSubmit,
editMode: false,
newMode: false
}
)
Issue now is Countrows is not delagable with SP List,
If(
CountRows(
Filter(
ECI_Dies_1,
dienum= Checkbox2_1.Text,
eci_id=SelectedRecordTitle1_1.Text
)
)<1
this piece of the code was preventing duplicate child records being created. since Countrows is not delagable with SP List how could i change that code to prevent Patch from adding data IF combination of Eci_id and Dienum exists in any record of ECI_dies_1 SP list?
Some additional information Checkbox2_1 Check and Oncheck on uncheck to add\remove to a collection. I thought maybe the collection could be useful in order to achieve this.
Collect(coldieselect,
{
Recordgalleryvalue: RecordsGallery1_1.Selected.Title1_1.Text,
checkboxvalue: Gallery1.Selected.Checkbox2_1.Text
}
)
Remove(coldieselect, LookUp(coldieselect, checkboxvalue = Gallery1.Selected.Checkbox2_1.Text And Recordgalleryvalue = RecordsGallery1_1.Selected.Title1_1.Text))