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

Excluding null values from Table

Hi,

 

I had posted this query in the building flows section and was asked to repost it here. 

 

I am creating a flow that is trying to do convert data from an invoice and populate an excel sheet saved on Sharepoint. 

 

  1. It triggers when an invoice PDF is saved to a Sharepoint folder
  2. An AI Model analyses the file and outputs certain fields to an excel sheet

The AI Model is working as expected and is detecting the fields that I require. Amongst these fields is a table that contains 3 columns. 

 

An example of the table is below:

 
 

image.png

 

The issue I am facing is the flow is creating multiple rows for each invoice. For example, when the flow pastes the "HSN/SAC" column it, outputs as follows:

image (1).png

 

How do I get it to output only one row and exclude all the rows where the values are null?

 

Screenshot of my flow is below:

image (2).png

 

 

Thanks for your help

6 REPLIES 6
JoeF-MSFT
Power Apps
Power Apps

Hi @tusharjalan,

 

Thanks for posting the question.

 

You can add a condition before the Excel action to check that the value of the row for HSN/SAC is not __null__. Like this:

 

2020-06-18_10-03-28.png

Hi,

 

Thanks for your response. I have amended the flow to include the condition as suggested. However, the result hasn't changed and I it it still outputting null rows. Please see below the amended flow and the output.

 

image.png

 

Output

 

image.png

Hi @tusharjalan,

 

I see that in the If yes block, the flow iterated over all entries again. Because you are already on an apply to each loop, there should not be one on the If yes block. 

2020-06-21_21-56-00.png

 

Let us know if this clarifies. 

Thanks Joe. That works great. However, I now note that if I want to extract other fields from the table - For eg. the Output CGST or Output SGST fields, I can't because they have null HSN/SAC values. What I am trying to get at is a excel spreadsheet that outputs the following fields in one row:

 

Invoice Number - Invoice Date - HSN/SAC code - Amount - CGST Value - SGST Value - Total Amount

 

Would that be doable?  

ALFRED05
Helper III
Helper III

You need to use the "amount" column for your condition, instead of the "HSN/SAC" this way you  can extract every line that has an amount.

In addition to the suggestion of @ALFRED05, if CGST and SGST are normally present in your documents like that, you can also tag them as fields and retreive them as fields instead of a table.

 

2020-06-22_19-37-56.png

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,508)