cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JenVitug
Kudo Commander
Kudo Commander

Error encountered when using a string variable as file parm for List Rows in a Table

Error encountered when using a string variable as file parm for List Rows in a Table

 

I have a requirement to open and process 38 xlsx files from 38 folders in 1 document library.  I wanted to automate the part for populating the value for the "file name " parameter from the List Rows in a Table so that i don't have to manually repeat the Listing of rows 38 times for each  individual file. 

 

i used a String variable to set the file name parameter for the "list rows in a table".   It is the exact same string of characters if i were to choose the file name parameter directly from the dropdown list .  

 

what am i doing wrong ?   isn't the value for the "file" param in List rows in a table of STRING type ?

 

FLOW param file has invalid value.JPG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JenVitug,

 

If so, you should list all folders and get all Excel files to get the identifier, please refer to the following steps:

Annotation 2020-05-29 175505.jpg

 

Annotation 2020-05-29 175533.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-litu-msft
Community Support
Community Support

Hi @JenVitug,

 

The File field should be File Identifier, not the file path, the file identifier is URI code format.

The Table field is not a simple string, it also a code, you could use Get tables action to get the table ID.

Please refer to the following steps to input dynamic content into List rows present in a table action.

Annotation 2020-05-29 104511.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

JenVitug
Kudo Commander
Kudo Commander

hi 

@v-litu-msft  🐕

 

FLOW param file as a variable.JPG

I don't have issues w/ the Table name as it can accept "custom Input"  however, it's the File parameter that i need to pass on values based on a list of filenames (e.g. in the screenshot,  /4003/filename.xlsx.   How do i get this parameter to accept variables ?

 

As you can see from screenshot, i need to process filename.xlsx inside each of folder 4003, 4004, so on and so forth.  I don't want to repeat manually naming the file parameter for each of the 38 filenames  (file parameter includes the path after the document library, e.g. folders and subfolders name included in file name param until you reach the filenam.xlsx itself

 

Hi @JenVitug,

 

If so, you should list all folders and get all Excel files to get the identifier, please refer to the following steps:

Annotation 2020-05-29 175505.jpg

 

Annotation 2020-05-29 175533.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 Will try this out and give feedback 😀

@v-litu-msft  ,  i am getting error in GET TABLES part, can you expand the Get Tables portion of your sample flow ?  I followed each step but got lost in Get Tables (your screenshot did not show details for this part)  What dynamic field should i put in the *file portion of the Get Tables ?

 

This is what id did (see screenshot)  and encountered errors when i ran the flow:test flow.JPG

Hi @JenVitug,

 

The table field should be dynamic content Table id:

Annotation 2020-06-02 144449.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-litu-msft  😁  ,

It WORKED !!!! Thanks so much 🐶 🎖🐾

Thank you so much.

 

hi @v-litu-msft ,

Sorry, i have another question... somehow, the List Rows in a Table is working , then the Apply to each "Value"  does not show the dynamic fields from the previous step (List Rows in a Table).

I need to process the fields for the rows fetched.  How do i specify this ?  i have tried  items('Apply_to_each')?['Owner"'"s Name']   but it is only returning nulls and not the values of field.  the Field name happens to have an apostrophe (Owner's Name)  .  how do i express the field name for this one which has apostrophe ?

 

i know you can help me 🙂

 

Hi @JenVitug,

 

Please try this:

 

items('Apply_to_each')?['OwnersName']

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,459)