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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to invoke stored p...
Power Automate
Unanswered

How to invoke stored procedure with NULL

(1) ShareShare
ReportReport
Posted on by

Hi,

 

I have an issue with passing NULL value to stored procedure. The procedure is a simple INSERT INTO some table. When I run the same procedure from Query editor on database with NULL parameters it works fine. When I do it from Flow, I receive error message that parameter was not supplied:

 

image.png

Same Flow with different values (for example @StartQ = 5) works fine. Is there any method to pass a NULL values to stored procedure (I want to have NULL in database table).

 

Any idea?

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Can you please share a screenshot of the flow? Are you passing the null value through an expression or just writing "null"? You might want to try passing through the null expression if not already. Please see the screenshot below: ww.png

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    I'm using an expression. Here is my code:

     @{if(equals(9999,triggerBody()['Executestoredprocedure_FinishQ']),null,triggerBody()['Executestoredprocedure_FinishQ'])}

    This code generates described error if Executestoredprocedure_FinishQ equals 9999, and works fine in other cases 😞

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    I would like to see where you are using that expression and I am hoping that you are using the null value from expression editor instead of typing null (as the former would take a null value and the latter would be a string "null")

     

    Hope this Helps!

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    I have some trouble with uproading screenshot. Please check the link:

    https://drive.google.com/open?id=1wM7W_2KP9ka0bS9hP0jlTpjFBe8Kf9Dt

     

    Expession was generated by clicking in expression editor 🙂

  • dixus69 Profile Picture
    3 on at

    Is there really no solution passing null into an sql query using an expression??

    The only workaround isn't working in all cases: Use a variable and condition. This is ugly and doesn't work with parallized iterations.

    Kind regards,
    Holger

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard