cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Manarjomar
Resolver I
Resolver I

Condition on field to insert in sql from excel

Hi there,

 

I have a flow to insert in a sql db from excel, so the loop read and insert right, but I have a new field and I need to evaluate it,

 

ORIGIN EXCEL AND DESTINY SQL:

@IF(equals(items('Aplicar_a_cada_uno')?['IdLocation'], 0),null,items('Aplicar_a_cada_uno')?['IdLocation'])

 

 

Screenshot_1.png

 

Some idea?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Got it.

 

If your excel column is of Number type, use following... You do not need @ symbol in the expression.

 

 

if(equals(items('Aplicar_a_cada_uno')?['IdLocation'], 0), null, items('Aplicar_a_cada_uno')?['IdLocation'])

 

 

If your excel column is of General\Text type, use following... You do not need @ symbol in the expression.

 

 

if(equals(items('Aplicar_a_cada_uno')?['IdLocation'], '0'), null, items('Aplicar_a_cada_uno')?['IdLocation'])

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

4 REPLIES 4
PrasadAthalye
Super User
Super User

 Are you trying to to check if Excel value is 0 and if not send the value to SQL ?

 

Are you facing issue with the equation?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye 

 

The issue I have it's "the expression is not correct" or something like that in English.

 

Really I need to check the value on Excel if is 0.

 

Thank you.

Got it.

 

If your excel column is of Number type, use following... You do not need @ symbol in the expression.

 

 

if(equals(items('Aplicar_a_cada_uno')?['IdLocation'], 0), null, items('Aplicar_a_cada_uno')?['IdLocation'])

 

 

If your excel column is of General\Text type, use following... You do not need @ symbol in the expression.

 

 

if(equals(items('Aplicar_a_cada_uno')?['IdLocation'], '0'), null, items('Aplicar_a_cada_uno')?['IdLocation'])

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Thank you mate,

 

Works perfect!!

Helpful resources

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

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,600)