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 / For loop after List ro...
Power Automate
Unanswered

For loop after List rows present in a table does not find value

(1) ShareShare
ReportReport
Posted on by 4
Hello, I have a following simplified version of my automate set up involving MS Form/Approval/Excel and am having trouble referencing a specific value from an action "List rows present in a table":
 
The overall flow looks as following:
1 - Form submission with excel attachment triggers the flow
2 - Excel script is executed to fill column AG with specific value that is dependent on the inputs in the form (e.g.if B2 is "China", AG2 will be "Active", B3 is "Canada", AG3 will be "Reject")
3 - Approval flow is sent
4 - Upon approving, new excel file is generated to copy information from the submitted excel
5 - Each row's relevant items from the submitted excel is copied to sharepoint and newly generated excel
 
The problematic part of the flow is 4 and 5, as following.
 
The column AG that was calculated in 2 is not properly referenced and copied to sharepoint and newly generated excel. In here you can see the output of "list rows present in a submitted excel's table". The value for column AG(ReferenceId) is properly recognized.
 
 
However, within for-each loop, the ReferenceId value is not picked up. Below is Compose 1 output.
 
 
I am pretty sure the actual referencing is correct. I use item()?['ReferenceId'] to refer to the item under column AG "ReferenceId". By similar formatting other values from the excel is properly copied. It's specifically this particular value that is not read by PA flow.
 
I am very much struggling why my flow can't recognize this column. Could it be that because it's the newly added value within this flow using excel script, it can not be properly recognized?
 
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,392 Super User 2025 Season 2 on at
    Hi
     
    I am sorry, its confusing, you say things like 4 and 5. 4 and 5 what? Actions? loops? Steps?
     
    I see no issues above, can you very specifically clarify what STEP doesnt work right and how does it get the data you think it should have (from the apply to each)?
     
    you talk about an Approval, I see zero approvals.
  • RH-15101743-0 Profile Picture
    4 on at
    Hello, I am referring to step 4 and 5 in the overall flow I listed. I excluded images for step 1~3 because those activities do work as intended for me. It's the activities within 4 and 5 that are not working as I expected. 
     
    The goal here is to copy an information from excel to another (newly generated) excel AND sharepoint. To put in picture:
     
    Excel to be copied from:
    Country Row ReferenceId
    China 3 Active
    Canda 2 Vancouver
    Japan 7 Osaka
     
    Excel I get when I "add a row" from original excel
    Country Row ReferenceId
    China 3  
    Canda 2  
    Japan 7  
     
    And I want ReferenceId column to be populated just like the original excel.
     
    Based on the last three images from my original post. It seems "List rows present in a submitted excel's table" can recognize the value in ReferenceId column. Becuase the output from that block has a string value assigned to ReferenceId. But when I look at the excel that had info copied to AND sharepoint, the info from ReferenceId is not listed. 
     
     
    So I think the problem is within this for loop. I expect it should go through all the rows from original excel and per row item, copy info to sharepoint and newly generated (another) excel.  That part is a success EXCEPT for the abovementioned column "ReferenceId" which the information can be found in the original excel but not in new excel nor sharepoint.

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard