cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FelipePanza
Helper II
Helper II

Update record on dataverse table based on another table

Scenario

 

Two Dataverse table in a solution

 

1. Table with all employee that has worked in department. Every employee has a unique employee ID number

2. Table is a table that is reported Monthly with the employees that are active in the department. They have also employee ID number that should match in table 1.


Goal is to update Table 1 based on table 2.
IF employee ID exist update column with new information, IF employee do not exist in table 1 create a new row.

I have started with this tutorial https://www.youtube.com/watch?v=SFlj1ykpvgM from @abm which compare two arrays.
I new to Power automate and have just used to send email based on condition.
I am surprised that something like this scenario is so difficualt to create.
Here is my flow: this is only takes the employee ID number from the two Table and create integer variable. Skjermbilde 2022-11-17 kl. 14.19.22.png

Skjermbilde 2022-11-17 kl. 14.21.19.png


I have now two variables: Employee ID active and Employee ID All.
Is it supposed to be that hard? and what is my next step?

 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @FelipePanza 

 

I have made a tutorial video based on this.

 

https://youtu.be/KBXoLco1O7Y

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

10 REPLIES 10
abm
Super User
Super User

Hi @FelipePanza 

 

Let me have a look at this and get back to you.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Matt_Dahdouh
Helper III
Helper III

Inside of a Apply to Each, list rows from the table you want it to go to, then use a update row action to update the table you are wanting.

Have tried some sort of what you are suggestion. My experience with Apply to each is that it takes a lot of time and often result in timeout (after 10 minutes)

I have noticed that if a flow times out, it still is running in the background. If you go back and look at your run history, you can see if it is still running or not.

FelipePanza
Helper II
Helper II

It is right that when I use Select it create Object?

abm
Super User
Super User

Hi @FelipePanza 

 

I have made a tutorial video based on this.

 

https://youtu.be/KBXoLco1O7Y

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Try setting the timeout duration for the action inside the Apply to each control.
The default timeout is 10 mins.
Click ... on the Action

Click on Settings, set the timeout to P1D to run for a max of 1 Day.

VenkataGolla_0-1668725758500.png

 

Hi, this is more than expected. Thank you very much.
I had a lot of trouble to recreate this because of a date problem. The monthly report table is a big table with many months, so I filter row in the action List rows with a Trigger Input. The trigger contains a date 01.11.2022. The flow return date as UTC with 31.10.2022. I had to change settings in the table. The Solution was given by @Prakash4691 in https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Dataverse-time-zone-change/td-p/1372843

My next challenge is to update choice column in Employee Master Table when creating or update row. This have to contain if statement/expression.

Example: Add new row

Field/Column: Level
Choices: Level 1, Level 2, Level 3
If Monthly report field "Position" = "Engineer" Set choice in Master Table to "Level 1".

Any tips on how to achieve this?

@Venkata-Golla Thank you for the tip.

@abm how can I update the record in Master list that are not in Monthly report list?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,639)