cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Helper V
Helper V

Updating an Excel table row - generalized solution

Thanks to those who have moved me forward on this project before.  I'm ready to solve a next problem or two.

 

I am building a flow which will be called to update a row in an Excel table.  Input parameters will include the fields for row selection and fields in the table which will drive an action for each field to leave it as is, clear it, or assign the new value.

  • I have already built the logic to retrieve the row to be updated.  I am accessing the row in a For Each loop (which will only look at one row).  I am expecting to use the automatically generated "_PowerAppsId_" field as the unique key.  I have entered this as the Key Column.  Now I need to populate the Key Value.  In Dynamic Content, I can see Current Item, but I cannot see a way to reference fields within that item, such as "_PowerAppsId_".
  • For each field in the row, I need to specify a value.  Logic should be something like this:

If input value is "#", clear the field

else if input value is not blank, post the input value to the field

else leave the field value unchanged

How do I build logic like this in the Expression builder?

5 REPLIES 5
akharns
Helper V
Helper V

Clarification:  I am using "Apply to each", not "for each".

DeepakS
Super User
Super User

Hi @akharns  ,

 

I think the Power Apps Id column should two "_" vs. one, like '__PowerAppsId__'

I would also recommend using a custom ID column so you can control the value as you want to use this in the filter, instead of using auto-generate by Power Automate, again, this is my thought.

 

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

You're probably right about the powerapps id field spelling.  I was hoping to use an auto-generated ID.  My records require more than one column for specification.  I suppose I could create a concatenated column to use as a key.  I'll give that a try.  Maybe this would be easiest.  Still, I am left without a method of referencing the values in the Current record, if needed.

 

The 2nd question remains to be answered.

Regarding using the new concatenated key field, here is a sample expression intended to build the key value 

vSubmissionMonth = 2019-10

triggerBody Vendor = XYZ

Expected key value:  2019-10-XYZ

 

The following code is not yet correct:

key eq concat(variables('vSubmissionMonth'),"-",@{triggerBody()?['Vendor']})

Hi @akharns 

 

Yes following should work:  

 

concat(variables('vSubmissionMonth'),'-',triggerBody()?['Vendor'])

 

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,277)