web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Updating field value with a value from a related entity

(0) ShareShare
ReportReport
Posted on by 5

I'm sorry if I'm on the wrong forum, but I'm stuck trying to figure out this problem.

I have an empty field (model number) in an entity called Orders, and a populated field (description) in an entity called OrderProducts.

I was wondering if it's possible to create a power automate flow or a workflow to update each (model number) with a corresponding value from (description).

For example, order id #1  in Orders gets a  value from   order id #1 (description)  in OrderProducts... etc for each order id.

I  know how to regularly update a field  in flows or workflows, but cant figure out how to loop through each order id..

Any help would be greatly appreciated.

I have the same question (0)
  • LuHao Profile Picture
    40,892 on at

    Hi partner,

    Are you using D365 Online or On-premise?

  • Valetudo Profile Picture
    5 on at

    sorry, should've mentioned it.

    It's Online, but I would love to know an "On premise" solution too, in case it ever comes up in the future.

    If it's not too much trouble, of course

  • Valetudo Profile Picture
    5 on at

    thank you for your quick response, Hao

    its Online

  • LuHao Profile Picture
    40,892 on at

    Hi partner,

    The relationship between Orders and OrderProducts is 1:N, right?

    If so, an Order has one or multiple OrderProducts.Then how do we filter out the Description field from which OrderProducts to update the Model Number field of Order? 

    pastedimage1618800412671v1.png As shown in the screenshot, there can be multiple OrderProducts in one Order.

    We must know the rule of extracting data from which OrderProduct in an Order to create a flow.

  • Valetudo Profile Picture
    5 on at

    Hi Hao,

    Yes, the relationship is 1:N

    each description also has a desc number associated to it. For example description/desc. number/ 100, 200, 300 etc.

    So my thought was to filter it by desc number 100. ie copy where desc number = 100.

    Does it make sense?

    Alternatively, I could grab description from product entity. However, i thought it would be harder. but after your post I actually think it may be easier.(?)

    But either way, I still need to loop through corresponding records and have no idea how.....

    Thank you

  • Verified answer
    LuHao Profile Picture
    40,892 on at

    Hi partner,

    We will use "List rows" and "Apply to each" action to update all Orders whose desc number = 100.

    pastedimage1618802194035v1.png

    pastedimage1618802205415v2.png

  • Verified answer
    Fubar Profile Picture
    2,761 on at

    In flow you would user Dateverse/Common Data Service (current environment) and use the List rows on the OrderProcucts with a query set to the filter to the Order.

    You then do an "Apply for each" and inside the to each use a DataVerse/Common Data Service (current environment)->Update a row (where the id of the row is the id from the Apply to each)

    (based on what you provided you would still need to do some string manipulation to extract exactly what you wanted from the Description)

  • Valetudo Profile Picture
    5 on at

    Thank you Hao,

    Will test at work in 8 hours.

    Will update on the results!

    Appreciate your help!

  • Valetudo Profile Picture
    5 on at

    Thank you LA

    That makes sense. Thank you for you suggestion

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 29 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans