cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
David44357
Frequent Visitor

Selecting a Cell in Excel Based on Dynamic Row and Column Name

I'm trying to fetch a specific cell of an Excel spreadsheet based on the row and column the user identifies. In the below example, if the user says 1250 and 2 in the form, the flow would fetch the number 102.

 

Screen Shot 2021-09-09 at 11.27.31 AM.png

 

The "filter query" below works to get the correct row, but when I try to use "Select Query" to select the column it gives me an error message: "An identifier was expected at position 0".

 

Screen Shot 2021-09-09 at 11.33.03 AM.png

 

I've tried just using a static number (e.g. "1") and several different syntaxes or strings vs. integers, but can't seem to get around it. Microsoft's official documentation doesn't seem to elaborate more on the correct syntax than what the Select Query hint text says ("comma-separated list of columns to retrieve") and the tutorials/guides/forums I've found never seem to cover it. 

 

I don't have any expertise to contribute to this forum to return the favor, so I'd prefer to just give a cash tip to the person that helps me (if that's allowed?), unless that's bad form. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-LilyW-msft
Microsoft
Microsoft

Hi @David44357 

Please take a try with the following screenshots to see if it helps.

This is my test Excel

vLilyWmsft_4-1631502092021.png

This is my test Form

vLilyWmsft_5-1631502107112.png

Flow in details:

vLilyWmsft_0-1631501745552.png

vLilyWmsft_1-1631501756211.png

vLilyWmsft_2-1631501777355.png

Expression:body('Filter_array')?[0]?[outputs('Get_response_details')?['body/ref85fded11074e5a98470551b13b8246']]

vLilyWmsft_3-1631501902973.png

Note: select 'Number', the formula show outputs('Get_response_details')?['body/ref85fded11074e5a98470551b13b8246'], you need to change this part to your own Form's question.

 

When a new form is submitted, flow will get the content.

vLilyWmsft_6-1631502206718.pngvLilyWmsft_7-1631502242663.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-LilyW-msft
Microsoft
Microsoft

Hi @David44357 

Please take a try with the following screenshots to see if it helps.

This is my test Excel

vLilyWmsft_4-1631502092021.png

This is my test Form

vLilyWmsft_5-1631502107112.png

Flow in details:

vLilyWmsft_0-1631501745552.png

vLilyWmsft_1-1631501756211.png

vLilyWmsft_2-1631501777355.png

Expression:body('Filter_array')?[0]?[outputs('Get_response_details')?['body/ref85fded11074e5a98470551b13b8246']]

vLilyWmsft_3-1631501902973.png

Note: select 'Number', the formula show outputs('Get_response_details')?['body/ref85fded11074e5a98470551b13b8246'], you need to change this part to your own Form's question.

 

When a new form is submitted, flow will get the content.

vLilyWmsft_6-1631502206718.pngvLilyWmsft_7-1631502242663.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (836)