cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frixel
Post Prodigy
Post Prodigy

Copy only the rows with data from table to another table

Hi all,

 

I will copy only the rows with data from a table to another table.

I think i must make a filter array but where and what is the command for to do that🙄

 

1.png

1 ACCEPTED SOLUTION

Accepted Solutions

Oh please be solved! Haha!

 

So it boils down to:

 

1. List all rows present in a table

 

2. Filter Array

   From: value -> from List all rows present in a table

   where

       trim(item()?['Process'])      not equal to     <leave blank>

 

3. Apply to Each

     From: Body -> output of Filter Array

 

     3.1 Add a row in the table

          Note when assigning values to each column in "Add Row To Table", use the expression:

 

          items('Apply_to_each')?['put_your_column_name_here']

 

View solution in original post

20 REPLIES 20
manuelstgomes
Community Champion
Community Champion

Hi @frixel 

 

Try this:

Screenshot 2021-03-17 at 08.49.45.png

You can add all the fields you want to check or only a few.

 

Can you please check if and let me know if you have any questions? 

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @manuelstgomes 

 

Thanks for your quickly response.

 

What do you mean with the "Own"?

Hi @manuelstgomes 

 

I don`t have "fields" in my 'Dynamic content" like the Colomn names.

 

1.png

chrissahagun
Resolver II
Resolver II

I'd say yes, filter array.  Make the condition "is not equal to" and leave the value blank.

 

chrissahagun_0-1615972074873.png

 

I think the input of your Apply to each must now be Value from your Filter Array, not from List Rows

@chrissahagun @manuelstgomes 

 

I don`t have a  Value from the Filter Array.

I don`t understand what to fill in the Filter array, do you that mean with 'let it blank'?

 

1.png

@chrissahagun @manuelstgomes 

 

I have now this but always the empty rows in the table.

 

1.png

 

2.png

chrissahagun
Resolver II
Resolver II

To Clarify...

 

In Filter Array:

chrissahagun_1-1615973660815.png

First box: any column in your dynamic content "List rows present in a table"

Second box: "is not equal to"

Third: <leave this blank>

 

In Apply to Each:

chrissahagun_2-1615973745670.png

 

input is "Body" from Filter Array.

 

And then in assigning values to each column in "Add Row To Table", use the expression:

 

 

 

items('Apply_to_each')?['put_your_colum_name_here']

 

 

chrissahagun_0-1615973540852.png

 

@chrissahagun @manuelstgomes 

 

Now i get this 😥

1.png

chrissahagun
Resolver II
Resolver II

Note my blue ink... do that. 🤞  And don't forget to make it "not equal to"

 

chrissahagun_0-1615974119624.png

manuelstgomes
Community Champion
Community Champion

Hi @frixel 

 

Let's take a step back. In the Filter Array's "From" you should have your array in your case the "value". That's correct.

 

In each of the rows you can pick the columns you want to check. In my case is "Own" but in your case you need to pick the ones you want to check. For example "name" "is not equal to" and leave it black will filter all Excel rows that don't have a value in the name.

 

Cheers
Manuel

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Sorry i now think my last screenshot is wrong. Deepest apologies...

 

can you try:

 

items(‘List_rows_present_in_a_table’)?[‘body’]?[‘Process’]

 

or if that does not work,

 

items(‘List_rows_present_in_a_table’)?[‘value’]?[‘Process’]

 

or

 

items(‘List_rows_present_in_a_table’)?[‘value’]?[‘body’]?[‘Process’]

frixel
Post Prodigy
Post Prodigy

@chrissahagun  & @manuelstgomes 

 

@manuelstgomes 
I dont have the "fields" in my 'Dynamic content" like the Colomn names.(your 'Own')

 

@chrissahagun 

For each suggestion:

items(‘List_rows_present_in_a_table’)?[‘body’]?[‘Process’]

or 

items(‘List_rows_present_in_a_table’)?[‘value’]?[‘Process’]

or

items(‘List_rows_present_in_a_table’)?[‘value’]?[‘body’]?[‘Process’]

 

I get this error.

 

 

1.png

I think you copied and pasted from my reply (the single quotes from your screenshot look too fancy - like a character taken from my smartphone)...  If so, please type the expression directly from your keyboard.  

@chrissahagun 

 

I don`t know what i do wrong 😎 but now i get this error when i type it from keyboard.

 

1.png

i think i got it 😄

 

item()?['Process']
frixel
Post Prodigy
Post Prodigy

No i don`t get an error but still the empty rows are copied.

1.png

 

Now it must i a loop, but where?

chrissahagun
Resolver II
Resolver II

maybe there are invisible white spaces?

trim(item()?['Process'])

@manuelstgomes 

 

YES, it seems that it works now.

Let me take some tests for surething 😇

 

1.png

Helpful resources

Announcements
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.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (1,961)