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 / Converting SQL Get Row...
Power Automate
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!

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @jnpb 

     

    You should put single quotes around the column name.

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

     

    Best Regards,

    Levi

  • jnpb Profile Picture
    on at

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

     

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard