hi
I have a collection that contains many records.
Can I delete only 1 record from the collection, instead of dlearing the whole collection.
Until now, I use clear (collection_name)
But ideally, i would like to check that
for each record of the collection,
-if the record exist in the data source, then I delete it form the collection
-if it doesn't exist in the data source, then nothing
is it possible to do something like that?
can someone help me write it?
thank you v much
Solved! Go to Solution.
Hi @blue_lotus
Expression: RemoveIf(MyLocalCollection, Title in DataSource.TitleCol)
Hi @blue_lotus
Expression: RemoveIf(MyLocalCollection, Title in DataSource.TitleCol)
Hi @blue_lotus ,
Could you please share a bit more about your Collection and data source that you mentioned?
Do you want to delete the specific record from your Collection if the record has been existed in your data source?
I assume that your Collection has a primary column called "CollPrimaryColumn", which could identify one record in your collection uniquely. The "CollPrimaryColumn" column match the corresponding column called "PrimaryColumn" in your data source.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Remove Records" button to following:
ForAll( RenameColumns(YourCollection, "CollPrimaryColumn", "CollPrimaryColumn1"), If( !IsBlank(LookUp('YourDataSource', PrimaryColumn = CollPrimaryColumn1)), RemoveIf(YourCollection, CollPrimaryColumn = CollPrimaryColumn1) ) )
Please take a try with above solution, then check if the issue is solved.
More details about the ForAll function and RenameColumns function, please check the following article:
Best regards,
User | Count |
---|---|
206 | |
98 | |
91 | |
46 | |
43 |
User | Count |
---|---|
251 | |
105 | |
104 | |
65 | |
56 |