cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lreinhard7
Level 8

Excel update action rowid link between invoice lines and headers

Hi,

 

I try to export some of my invoice lines to excel by making use of an invoice line entity from D365FO.

This works fine so far.

 

In a second step, I try to add the invoice header information (from the invoice header entity in D365FO) to my excel lines by making use of the update excel functionality.

Now, I have the problem that I need to specify the row id that identifies, which row to update and here my problem starts.

 

My invoice lines are linked to my header through the ParentRecIdField. I.e. in my excel invoice lines section, I have a column that holds the ParentRecIdField. The corresponding field in the invoice header field is denominated UniqueInvoiceIdentifier.

 

Question:

What do I have to enter in the row id field in the Excel update row action to get the invoice header information assigned to all of my lines?

Note: Multiple lines can be assigned to the same header.

 

Would be great if you could help.

 

Many thanks and best regards,

 

Ludwig

3 REPLIES 3
dynamiacs
Level: Powered On

Re: Excel update action rowid link between invoice lines and headers

Hi Ludwig,

 

in the excel there should be a column for the PowerAppsID. This is an unique number for the row.

 

Try this.

 

Regards

Jan







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


Proud to be a Flownaut!






Community Support Team
Community Support Team

Re: Excel update action rowid link between invoice lines and headers

Hi @lreinhard7,

 

Could you please share a screenshot of your flow's configuration?

 

I suppose that you add "Get records" action of Dynamics 365 For Operations connector within your flow and want to update the invoice header information of each record of Invoice Header entity into the excel file with a "Apply to each" action (loop action). Is it true?

 

Please take a try with my following thought as a reference:

  • Add a proper trigger, here you could use Flow Button trigger.
  • Add a "Get records" action of Dynamics 365 For Operations connector, Entity name set to Invoice Header entity in your D365FO.
  • Add a "Get rows" action, specify the File Name (Excel file name) and Table Name.
  • Add a "Apply to each", input parameter set to output of "Get records" action.
  • Within "Apply to each", add a "Filter array" action, From set to output of "Get rows" action, left input box set to Invoice lines dynamic content of the "Get rows" action, right input box set to Invoice lines dynamic content of the "Get records" action. Within middle drop down, choose is equal to. 

         Add a "Apply to each 2" action, input parameter set to output of "Filter array" action. Within "Apply to each 2" action, add a  "Update row" action, Row id field set to following formula:

      

item()?['__PowerAppsId__']

Invoice Header Information field set to Invoice Header Information dynamic content of "Get records" action.

 

Image reference:8.JPG

 

9.JPG

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lreinhard7
Level 8

Re: Excel update action rowid link between invoice lines and headers

Hello Kris,

Thank you for your feedback.

I am not very clear with the filter array that I have to apply.

Maybe I did not express precisely what I want to achieve.

So, let's try again with what I have so far.

1. I use a recurrence trigger

2. Then I retrieve the invoice headers (FTI headers)

3. Once I have the headers, I retrieve the lines (FTI lines) because each header has one or more lines.

4. Then I insert all lines into my excel sheet. I start with the lines because later on, I want to update each line with the header information.

5. Then I said get rows

Now I am a bit stuck because I need to filter first all of my rows to get the rowid from Excel.

Once I have this id and know which lines to update I have to link the FTI lines to the FTI headers. This linkage is established by a field ('parent recid') that can be found in the FTI lines. In the FTI header, the field name is unique identifier (recid). I am not sure how to establish this filter & linkage and how to update my excel rows then.

Can you help with that?

Best regards,

Ludwig

flow.png

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 322 members 5,536 guests
Please welcome our newest community members: