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 / Selecting Field from G...
Power Automate
Answered

Selecting Field from Get Rows to Feed to Stored Procedure in Flow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow which essentially gets the value of a field from an on-premise database and feeds it as a parameter of an on-premise stored procedure. The get rows block (named Get_NL_TRAN_ID) provides the following output:

1.PNG

After, I am feeding CTL_SEQ_NUMBER to a stored procedure by using: body('Get_NL_TRAN_ID')?['value'] and am getting the following:

2.PNG

It seems I am not referencing the CTL_SEQ_NUMBER field appropriately. How can I do this please? 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,026 Most Valuable Professional on at

    If you want just the CTL_SEQ_NUMBER then I think you want to use the following as your parameter.

    body('Get_NL_TRAN_ID')?['value']?['CTL_SEQ_NUMBER']

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I tried it and get the following error: "InvalidTemplate. Unable to process template language expressions in action 'Insert_in_NL_TRN_TEMP' inputs at line '1' and column '2649': 'The template language expression 'body('Get_NL_TRAN_ID')?['value']?['CTL_SEQ_NUMBER']' cannot be evaluated because property 'CTL_SEQ_NUMBER' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'."

     

    I guess the Get Rows block returns an array and one must filter it before using it?

  • Pstork1 Profile Picture
    69,026 Most Valuable Professional on at

    I think then you need to use an index something like this.  Would need to see the full Json to be sure I'm using the index in the right place. But its something like this.

    body('Get_NL_TRAN_ID')?['value']?[0]?['CTL_SEQ_NUMBER']

    If you can provide a JSON payload with more than one row I can provide a more accurate answer

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Worked - thanks! Is there any documentation re this syntax so I can understand better?

  • Pstork1 Profile Picture
    69,026 Most Valuable Professional on at

    Nothing I've seen specific to using it in Flow.  But it is just regular JSON syntax.  Here's a tutorial on JSON.

    https://www.tutorialspoint.com/json/json_syntax.htm

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard