cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
masaustin
Level: Powered On

Get specific value when add a row in excel

Hello Everyone, 

 

I'm a beginner here, I'm creating a flow for receive data from forms, and add a row in excel, then excel will count and fill the value into the other column at same row, then I want to get that created value then fill into sharepoint and mail, I got two question here:

 

1) use "get a row "

How to set the "Key Column" and "Key Value" to make it dynamic generate when adding a new data from forms then I can get?

 

2) use "List rows present in a table" 

How to set the "ODATA filter query" to get the latest value from specific column?


Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
manuelstgomes
Level 10

Re: Get specific value when add a row in excel

HI @masaustin 

 

Let's do this in parts

 

Use Get a Row

 

To set a Key Column, to use the "Add a key column to a table" action. You need to do it once. Regarding its value, you need to insert the Key-Value when adding the value. You can either create a random number by using the formula below or have a place where you store a sequential number so that you can use when adding a new row.

rand(10000,999999)

 

I would go for the random number. Less work and simple to implement.

 

Use "List rows present in a table."

There's no ODATA to filter by column. SharePoint provides that, but the Excel connector doesn't have something similar, unfortunately.

You have to fetch all values and then get the value from the column you need. You can access the last value inserted using the formula:

 

last(body('<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Name</span> <span class="token attr-name">of</span> <span class="token attr-name">the</span> <span class="token attr-name">action</span> <span class="token attr-name">that</span> <span class="token attr-name">fetches</span> <span class="token attr-name">all</span> <span class="token attr-name">values</span><span class="token punctuation">></span></span>')?['value'])

 

Is this what you need

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

 

View solution in original post

2 REPLIES 2
manuelstgomes
Level 10

Re: Get specific value when add a row in excel

HI @masaustin 

 

Let's do this in parts

 

Use Get a Row

 

To set a Key Column, to use the "Add a key column to a table" action. You need to do it once. Regarding its value, you need to insert the Key-Value when adding the value. You can either create a random number by using the formula below or have a place where you store a sequential number so that you can use when adding a new row.

rand(10000,999999)

 

I would go for the random number. Less work and simple to implement.

 

Use "List rows present in a table."

There's no ODATA to filter by column. SharePoint provides that, but the Excel connector doesn't have something similar, unfortunately.

You have to fetch all values and then get the value from the column you need. You can access the last value inserted using the formula:

 

last(body('<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Name</span> <span class="token attr-name">of</span> <span class="token attr-name">the</span> <span class="token attr-name">action</span> <span class="token attr-name">that</span> <span class="token attr-name">fetches</span> <span class="token attr-name">all</span> <span class="token attr-name">values</span><span class="token punctuation">></span></span>')?['value'])

 

Is this what you need

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

 

View solution in original post

masaustin
Level: Powered On

Re: Get specific value when add a row in excel

@manuelstgomes Thank you for your help!

 

It works in use "Get a Row", I'm still trying "List rows present in a table", maybe some of my setting is wrong, but it's good for me to solve this problem and move on.

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 (Last 30 Days)
Users online (5,528)