I am trying to test a comparison for a Delete item flow using a filter array. I don't believe it is working properly, as I am not getting the results I think I should be getting.
My assumption is the array return should only include Jack Frost, Mary Appleton, Merv Gruper, Sammy Hammer - from the Test Data Transfer List, as they don't appear on the MWEmployeeList.
But my results are not showing my assumption, rather all the names from the MWEmployeeList.
Apply to each Value ('Get items' Employee_List body/value)
Filter Array Value ('Get items2' Transfer_List body/value)
FullName (item()?['FullName'] is not equal to FullName items ('Apply to each') ?['Title'] (which is FullName)
Back to this 'Create items' component; I have pre-existing data in SPList2, where the new items are to be created.
I don't want those 'existing' items overwritten or changed as a result of the 'Create items'.
How do I create the new items where there are existing items?
Am I correct in assuming I need a Condition that compares the Output of Select1 to Select2, and where Select1 doesn't exist create the item in SPList2? This will leave existing as is and ONLY create new items?
Content removed.
My portion and my flow are not with the Excel file.
I'm working with the SPList.
There are currently 602 items in the source SPList1 and 582 in the destination SPList2.
One of the columns in the source SPList1 that has blanks is 'Title'.
I put - Title ne '' in the filter query of the Get items (the source data). Should this eliminate the blanks?
You need to type in the column name and that it is not equal to '' (two single ' quotes that identify no text)
Type this below in your filter and replace the column name. If your column name has spaces or special characters, it probably won't work properly.
ColumnName ne ''
Excel
Ok.
Building it right now.
Question; How do I filter OUT all blanks coming in from the Get items and Get items 2?
The data source flow (source is and Excel workbook with a Table, created by someone else) has a Table range of A:O rather that A1:O (whatever the line number - around 650), and is creating hundreds of blanks lines in my SPList2 that I don't want or need.
Can I build and expression in the Get items filter query that will eliminate these blanks?
It is basically the same process except opposite when it comes to the Select and Filter Array. I've added the steps to the previous flow.
Add New Items
Great.
Now my source data (SPList1) has 604 items and my updated data (SPLIst2) has 582 items.
This means the delete worked, however there are new items in SPList1 that need to be added to SPList2.
How and where do I add a 'Create item' to account for and make copies of the new items from SPList1 to SPList2?
Here are the steps that will delete the items from your Test List.
SP Filter Delete Items Not Matched
I want to delete items from the Test List. the MWEmployee is the source data. If the name is not on MWEmployee delete it from Test List.
The flow doesn't make sense to me with the Apply to Each and then a Filter Array.
You are saying For Each item in the Employee List, I want to Filter the Transfer List to show all items that do not equal the item name from Employee List.
So the first Apply to Each will be using "Curtis T", and the Filter Array will have all of the Transfer List names that do not equal "Curtis T".
The second Apply to Each will be using "Bo Regard", and the Filter Array will have all of the Transfer List names that do not equal "Bo Regard". (It will still include "Curtis T" because that filter array is on the previous loop.) The only name that will be filtered out is "Bo Regard".
The third Apply to Each will be using "Julie DeLaw", and the Filter Array will have all of the Transfer List names that do not equal "Julie DeLaw". (It will still include "Curtis T" and "Bo Regard" because those filter array is on the previous loop.) The only name that will be missing is "Julie DeLaw".
Each Apply to Each loop is it's own flow. The filter array doesn't carry over actions from the previous Apply to Each.
Which list are you trying to Delete items from?