I have a flow for an e-mail inbox, and I want it to record the time at which an e-mail message was first replied to. It's a shared inbox, so we have a policy to always CC or BCC the inbox in the reply so that it effectively e-mails itself when a team member replies. I use this as the trigger, and I have a flow that fills in an Excel table with bits of relevant data on e-mail receipt.
My flow currently does this:
E-mail Recieved > Initilialize Array Variable > List Rows > Populate Array with ConversationID > Check if the Conversation ID is in the list > If yes, check if it's come from the inbox (i.e. e-mailed itself) > If yes, update Column X in Excel table.
So I'm stuck because sometimes there are multiple replies for the e-mail, and presently it always updates and overwrites the data. What I want is the last condition to be 'Update Column X if Column X is empty'. If 'Column X' already has a value, I want it to skip and terminate the Flow.
I tried using an if statement, but the flow says it's not valid syntax:
if(empty(item()?['Column X']),triggerBody()?['DateTimeReceived'],item()?['Column X'])
How can I perform this logic? Any advice would be greatly appreciated.
Not entirely sure if this has been solved before, but I can't find an answer to this so apologies if I have missed it.
Solved! Go to Solution.
Thanks for the help on the expression. I think the next problem is that this is returning a value of 'True' when the cell is not empty, which is not correct. I don't think it's testing the correct cell. Any ideas on how I can make sure it's using the right row?
You might have spaces on certain cells. You could check length expression of that cell to make sure it's returning zero. You may need to use trim as well before using the length.
length(trim('columnname')) > 0
Thanks for getting me on the right track! I had missed a step. Basically, I had forgotten to dump the column into a string variable. now that this is filled, I can do my checks (per your post) and it works.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Many congratulations to the Season 1 2021 Flownaut Crew!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
Check out the community blog page where you can find valuable learning material from community and product team members!