Hi,
I'm having issues with duplicates with Add row Into table from one excel table to another.
In table 1 I have
ID | Status | Customer | |
ID_1 | Approved | Customer_1 | |
ID_2 | Handled | Customer_2 | |
ID_3 | Not Handled | Customer_3 |
In table 2 I have
ID | Status | Customer | Email Sent? |
ID_1 | Approved | Customer_1 | Yes |
ID_2 | Handled | Customer_2 | No |
I need to update table 2 with the new row from table 1 without Writing over the two existing rows and without creating duplicates for the existing rows.
The ID is unique to each row in both tables (It is the same ID).
Table 1 is a sheet that is updated each day whilst table 2 is a sheet that we are using for a number of different processes calculations.
So the updated table 2 should be:
ID | Status | Customer | Email Sent? |
ID_1 | Approved | Customer_1 | Yes |
ID_2 | Handled | Customer_2 | No |
ID_3 | Not Handled | Customer_3 |
I can't find a reliable way to do this. Any tips as to how to achieve this?
Any help is greatly appreciated
@grantjenkins I have figured it out, it looks like the _ and the . in the column name aren't being recognised. When I change the column Title in the Table 1, and re do the expression and then re run the flow. it works perfectly and pulling the mobile number in. I thought I put in as reply, maybe helpful for others.
@grantjenkins I follow your flow, and it works for me however I have notice in my case the mobile number column where they are numbers, but the column format in both table are set as text, did not populate the data in my table 2. Could it be the expression use when matching the field from table 2 to table 1?
Appreciate if you could advise what's wrong with my expression. Thank you.
This was actually helpful, thing is you need to keep both Enter Key and Enter Value fields blank and then click switch map to text mode, I was entering key value then I was clicking switch to text mode and then I was clueless
Unable to process template language expressions for action 'Apply_to_each' at line '0' and column '0': 'The template language expression 'outputs('Filter_array')['body/value']' cannot be evaluated because property 'body/value' doesn't exist, available properties are 'body'.
This is not working if Table 2 is empty or null or at initial state, please help out further
Thank you! That was it! Accepting @grantjenkins solution.
Thank you both!
Hi @HSFO , The mismatch seems to be the Select Action. Please switch to text mode and assign UTI value as done by @grantjenkins
Thank you for the quick reply!
It worked on the first go, but unfortunately when running it again it started where the last flow ended and added a whole new set of rows.
In my sheet ID is UTI
There might be some mistakes on my part here. Any suggestions as to why it failed?
Here's what I would do. Tested and working well. If you've got more than 256 rows in your Tables, then you'll also need to add some pagination - let me know and I can show you.
Full flow below. I'll go into each of the actions.
List rows present in a table (x 2) gets all the rows for each of the tables.
Select extracts out an array of all the IDs from table 2.
Filter array checks to see if the ID is contained in the output from Select (IDs)
We then loop over each of the items in our Filter array and add them to the table.
The expressions used are:
items('Apply_to_each')?['ID']
items('Apply_to_each')?['Status']
items('Apply_to_each')?['Customer']
Hi.
The sheet will probably be updated once a day for all business days. So lets say 300 times a year.
I was considering using a trigger on changes in source file (table 1), but a scheduled trigger would also work as the update on table 1 would be in the morning.
I would love to see you solution! In the mean time I can try to build a flow based on your suggestion. Thank you so much for your reply.
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional