web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Add row based on condi...
Power Automate
Unanswered

Add row based on condition

(0) ShareShare
ReportReport
Posted on by 45

I have built a model in AI Builder to extract data from invoices and add them to an Excel table. This as worked perfectly and I want to take a step further with a condition. 

 

These invoices have various PO numbers and I'd like the flow to work like this:

Value: PO Number Value  > is equal to > 4200055263

 

If yes: Add row into a table

 

The flow is successful yet nothing is added to the table. I tested a few different PO numbers and same results. 

 

The flow for adding all invoices works perfect so I've done something wrong with the condition. Could someone point in the right direction? Thank you. 

Flow.png
Categories:
  • Sundeep_Malik Profile Picture
    6,501 on at

    Hey @KBRedStone 

     

    Your condition is PO Number Value = 4200000000...

     

    Change it to greater than and equal to

     

    Sundeep_Malik_0-1679936954400.png

     

    I hope this helps 🙂

     

  • KBRedStone Profile Picture
    45 on at

    Thank you! I will try this tonight. 

  • KBRedStone Profile Picture
    45 on at

    I got this error:

     

    Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'greaterOrEquals' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'.

     

     

    Screenshot 2023-03-27 at 8.09.27 PM.png
  • laila2021 Profile Picture
    52 on at

    Is it possible that the column where your data for invoice number is stored in General or Text format? Format the column to a number type and I hope the flow works.

  • KBRedStone Profile Picture
    45 on at

    It was General, I changed it to Number, same error. 

     

    Is PO Number Value the correct choice?

    Screenshot 2023-03-27 at 8.44.22 PM.png
  • laila2021 Profile Picture
    52 on at

    I am not sure... when you run the flow and it has error, you can look into the process. From there, you can see if the value comes out as the number 42****** or differently. If you are not sure where to look, go to the front page of your flow and check the 28-day run history. 

    laila2021_0-1679968320257.png

    Click on the instance, and check on the step where the condition is, and see what is the value that is parsed there.

     

    If it shows the correct text, you can try the following.

     

    Add the step to:

    1. Initialize variable - Name: Any variable name such as InvoiceNo, Type: Integer, Value: leave it empty
    2. Add Compose - Inputs should be the PO Number Value
    3. Set variable - Name: The variable you set earlier InvoiceNo, Value: Take from Compose step

    This would convert the Invoice number to integer and i hope solves the issue.

  • svm75 Profile Picture
    77 on at

    Hi. 

    quick one, I use a condition to add rows into a table if the foreign key in table B equals the primary key in table A but on one side, I have a GUID type (table a) and on the other side a text field type. I thought I could change the GUID to a string but I got an error.  Any idea?

     

    thanks. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#2
Henil Profile Picture

Henil 128

#3
anirudhev Profile Picture

anirudhev 124

Last 30 days Overall leaderboard