cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Canjun
Frequent Visitor

is there a way to copy and paste with conditions?

微信截图_20210411222613.png

I just start using power Automate this Friday so I am not familiar with all its functions yet. All I know how to use is to use the desktop recorder. I hope I can learn something more from here.

I have this data entry work once a while, the data would look like what's in the picture. I want to copy those data to another software. But at the same time, I don't want those 0 numbers to be copied. Is there a way to use the if condition to detect "copied value" is 0/blank or not? if yes then proceed to paste if not then go to the next row.

Thank you! 

8 REPLIES 8
Tejashree_G
Helper I
Helper I

@Canjun 

Your amount column contain "0" value so with using if condition it is possible to first check what is in your amount column row value then if there is a "0" then skip that row if there is a value then do what ever you want. 

Hi Tejasheree,

 

Would you mind sharing an code example with me? I understand the logic that you're saying but I have no idea how to write it.

 

Thank you!

hello

please check below screenshot

 

Tejashree_G_2-1618301052824.png
Tejashree_G_1-1618301015684.png

Tejashree_G_3-1618301365001.png

 

Hi Tejashree,

 

Sorry about the late response. I've been trying to figure out how to use your method but fail to succeed.

Canjun_0-1618578997249.png

here's my building. it can act successfully for the first cell and when it comes to the second cell, the condition doesn't work.

Canjun
Frequent Visitor

Canjun_1-1618582594534.png

Canjun_2-1618582657803.png

 

I tried to find out whether the if condition is working or not. then I found that no matter which value I put in the excel, it wouldn't pop up the message

Canjun
Frequent Visitor

Canjun_0-1618584334518.png

I tried to run it step by step and in order to check whether the condition is really checking the value,

I put 0 for all three columns. But it still goes to false

first check your current item value in display msg box, then go to if condition.

1. read excel - you will get excel data variable

2. for each- add excel data variable in for each

3. current item- check current item value in display msg box

4. 2nd for each - add 2ndfor each under then first for each.

5. apply if condition- current item[column item]=0 or esle if <>0

 

pls check your screen shot if condition part, (current item= 0 ) ?

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,620)