Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Find a row in Dataverse with same field value

(0) ShareShare
ReportReport
Posted on by 478

Hi,

 

I have 2 tables in Dataverse:

 

1) Employee

 

Name

Lastname

EmployeeID

Status

 

2) Request

 

EmployeeID

Field1

Field2

Field3

 

When someone on the table Employee change the status, I need to run a flow that send an email to a mail address containing the fields information in the Request table.

Both tables have the same column and value EmployeeID.

So, I need to create a flow "when a row is updated" in Employee table and lookup for the information on the Request table based on the same EmployeeID column.

How can I achieve that?

 

Thanks in advance.

  • Linn Zaw Win Profile Picture
    Linn Zaw Win 2,982 on at
    Re: Find a row in Dataverse with same field value

    @EmilioRoqueta69 

    To add some more to @sandeepstw 's answer on point no. 2, I recommend using the "Select columns" parameter in the trigger with the logical name of the status column in the Employee table. (because the trigger does not contain the previous status value to compare if the status value has been changed)

    LinnZawWin_0-1688944702479.png

     

    To get the Request records using the List rows action, you can use eq condition in the Filter rows parameter.

    LinnZawWin_1-1688945191714.png

     

     

  • sandeepstw Profile Picture
    sandeepstw 233 on at
    Re: Find a row in Dataverse with same field value

    Hi There,

     

    To achieve the desired functionality where an email is sent to a specified email address when the status of an employee is changed in the Employee table, with the fields information from the corresponding row in the Request table, follow the technical solution below:

    1. Create a Power Automate flow: Begin by creating a new flow in Power Automate. Use the "When a row is updated" trigger for the Employee table. This trigger will detect changes in the status column of the Employee table.

    2. Add a condition: Within the flow, add a condition action to check if the status column has changed. Configure the condition to compare the previous and current status values. This will ensure that the flow only proceeds if the status has been updated.

    3. Retrieve information from the Request table: Inside the condition, add a "Get rows" action to retrieve the corresponding row from the Request table based on the EmployeeID. Use the EmployeeID from the Employee table to filter the rows in the Request table and retrieve the required information.

    4. Compose email body: Utilize the "Compose" action to construct the email body. Include the necessary fields and information from the retrieved row in the Request table.

    5. Send an email: Add the "Send an email" action to send an email to the desired email address. Configure the email subject, recipient, and include the composed email body from the previous step.

    6. Save and test the flow: Save the flow and test it by updating the status column of an employee in the Employee table. Verify if the flow triggers successfully and sends the email with the appropriate fields information from the corresponding row in the Request table.

    By following these steps, you can create a Power Automate flow that sends an email with the fields information from the Request table when the status of an employee in the Employee table is updated. Make sure to save and test your flow with various scenarios to ensure it functions as expected.

     


    Please give kudos and mark as solution if it helps.

     

    Thanks,
    Sandeep Mishra

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard