Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Converting SQL Get Rows data to Integer for comparison against Excel data

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I have a flow that checks a field value in an Excel table against an SQL database for the matching value, and then takes all the row data from that SQL record and attaches it to the Excel table row. 

 

However,  my condition statement in the flow always returns as false because the data type from SQL and the Excel file dont' match. In talking through this online someone had mentioned that I need to wrap the condition check with an expression to convert the Excel value to an integer, provided me with the expression to enter to the condition statement, but Power Automate returns this expression as invalid. 

 

Looking for insight on how to get the data type to match so that the comparison the condition statement is doing is valid and pulls in the required data. 

 

The part of my flow that this pertains to looks like this; 

 

Screenshot 2022-11-06 172345.png 

The person talking me through this gave me this expression to enter to the right of the IS EQUAL TO statement to convert the Excel value to an integer to match the SQL data and therefore make it possible to compare and correctly return the other row field data: 

 

int(items('Apply_to_each_2')?[Registration ID])

 

However, I tried to put this into the field and it returns with Invalid Expression. 

How do I solve for this? This is the last piece of a very complicated flow puzzle and I'd love to solve this once and for all. 

Thank you!

 

 

 

  • jnpb Profile Picture
    on at
    Re: Converting SQL Get Rows data to Integer for comparison against Excel data

    That did it! Thank you so much! Tested and confirmed working. 

     

     

  • Verified answer
    v-liwei-msft Profile Picture
    on at
    Re: Converting SQL Get Rows data to Integer for comparison against Excel data

    Hi @jnpb 

     

    You should put single quotes around the column name.

    int(items('Apply_to_each_2')?['Registration ID'])

     

    Best Regards,

    Levi

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492