cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Post Patron
Post Patron

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
Post Patron
Post Patron

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

DeepakS
Resident Rockstar
Resident Rockstar

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,912)