Hello,
I am trying to update a speadsheet in the following ways:
if a cell is empty, delete the row
if that same cell contains certain words, delete the row. Below is what i have(I left off the Empty option, as I gave up on it a while ago, but if you have suggestions, I would love to try it)
Hi @Bf1980,
Since you are judging the same Column, you could directly merge these Conditions into one condition.
It can also be judged whether this field is empty or not.
I speculate that these three conditions need to delete the corresponding row as long as they satisfy one, so you need to use the or() function.
You could consider replacing Delete a row action with Delete row action.
In addition, if you can, it is recommended to set Button or Recurrence as the trigger, because deleting the row operation is also changing the file, which will make Flow into a loop.
Expression reference:
@or(contains(items('Apply_to_each')?['PM_x0020_Description'], '"Emergency"'),contains(items('Apply_to_each')?['PM_x0020_Description'], 'Evaluation'),empty(items('Apply_to_each')?['PM_x0020_Description']))
Image reference:
Please take a try.
Best Regards,
Thank you! I have tried your solution, it seems to want to work, but I get a 423 error everytime I run it. I tried to do a save as and created a new file, just to see if that would work, it did not! do you have any ideas?
So, I was able to get the flow to run, But it is not deleting any of the rows.
I modified your code slightly:
@or(contains(items('Apply_to_each')?['PM_x0020_Description'], '"Emergency"'),contains(items('Apply_to_each')?['PM_x0020_Description'], '"Evaluation"'),empty(items('Apply_to_each')?['PM_x0020_Description']),contains(items('Apply_to_each')?['PM_x0020_Description'], '"Engineering"'),contains(items('Apply_to_each')?['PM_x0020_Description'], '"Inspection"'))
attached you will see that the flow completes successfully
User | Count |
---|---|
88 | |
79 | |
45 | |
29 | |
25 |
User | Count |
---|---|
38 | |
29 | |
26 | |
22 | |
18 |