topic Updating an Excel table row - generalized solution in Building Flows
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458358#M54815
<P>Thanks to those who have moved me forward on this project before. I'm ready to solve a next problem or two.</P><P> </P><P>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.</P><UL><LI>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_".</LI><LI>For each field in the row, I need to specify a value. Logic should be something like this:</LI></UL><P>If input value is "#", clear the field</P><P>else if input value is not blank, post the input value to the field</P><P>else leave the field value unchanged</P><P>How do I build logic like this in the Expression builder?</P>Fri, 31 Jan 2020 18:54:27 GMTakharns2020-01-31T18:54:27ZUpdating an Excel table row - generalized solution
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458358#M54815
<P>Thanks to those who have moved me forward on this project before. I'm ready to solve a next problem or two.</P><P> </P><P>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.</P><UL><LI>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_".</LI><LI>For each field in the row, I need to specify a value. Logic should be something like this:</LI></UL><P>If input value is "#", clear the field</P><P>else if input value is not blank, post the input value to the field</P><P>else leave the field value unchanged</P><P>How do I build logic like this in the Expression builder?</P>Fri, 31 Jan 2020 18:54:27 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458358#M54815akharns2020-01-31T18:54:27ZRe: Updating an Excel table row - generalized solution
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458364#M54817
<P>Clarification: I am using "Apply to each", not "for each".</P>Fri, 31 Jan 2020 19:15:06 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458364#M54817akharns2020-01-31T19:15:06ZRe: Updating an Excel table row - generalized solution
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458370#M54819
<P>Hi <LI-USER uid="83898"></LI-USER> ,</P><P> </P><P>I think the Power Apps Id column should two "_" vs. one, like '__PowerAppsId__'<BR /><BR />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.</P><P> </P><P><SPAN>——————————————————</SPAN><BR /><SPAN>If I have answered your question, please mark your post as Solved.</SPAN><BR /><SPAN>If you like my response, please give it a Thumbs Up.</SPAN></P>Fri, 31 Jan 2020 19:22:25 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458370#M54819DeepakS2020-01-31T19:22:25ZRe: Updating an Excel table row - generalized solution
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458372#M54820
<P>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.</P><P> </P><P>The 2nd question remains to be answered.</P>Fri, 31 Jan 2020 19:27:41 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458372#M54820akharns2020-01-31T19:27:41ZRe: Updating an Excel table row - generalized solution
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458392#M54825
<P>Regarding using the new concatenated key field, here is a sample expression intended to build the key value </P><P>vSubmissionMonth = 2019-10</P><P>triggerBody Vendor = XYZ</P><P>Expected key value: 2019-10-XYZ</P><P> </P><P>The following code is not yet correct:</P><P>key eq concat(variables('vSubmissionMonth'),"-",@{triggerBody()?['Vendor']})</P>Fri, 31 Jan 2020 19:54:45 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458392#M54825akharns2020-01-31T19:54:45ZRe: Updating an Excel table row - generalized solution
https://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458449#M54831
<P>Hi <LI-USER uid="83898"></LI-USER> </P><P> </P><P>Yes following should work: </P><P> </P><P><SPAN>concat(variables('vSubmissionMonth'),'-',triggerBody()?['Vendor'])</SPAN></P><P> </P><P><SPAN>——————————————————<BR />If I have answered your question, please mark your post as Solved.<BR />If you like my response, please give it a Thumbs Up.</SPAN></P>Fri, 31 Jan 2020 21:27:59 GMThttps://powerusers.microsoft.com/t5/Building-Flows/Updating-an-Excel-table-row-generalized-solution/m-p/458449#M54831DeepakS2020-01-31T21:27:59Z