Forum Discussion

HennSarv's avatar
HennSarv
Helper I
5 years ago
Solved

Follder.Content and Folder.Files option

Hi people, MIght someone give me hint to find some reference Folder.Files(path as text, optional options as nullable record) as table Folder.Contents(path as text, optional options as nullab...
  • v-yingjl's avatar
    5 years ago

    Hi HennSarv ,

    About the optional paremeter in Folder.Files() function, the official document has not explained it in details.

    Based on my test, this parameter is about restricting power bi to get data when the file in the folder is opened / accessed.

    For example, I have created two queries both connecting to the same folder, one of the parameter is set as true, another is set as false.

    When I do not open any files in the folder, I can get the data from both queries. Both of them can import data into power bi:

    When I open the file in the folder and refresh the query in power bi, the query which parameter is set as true will get IO errors like below while the false parameter can get data normally:

    In addition, if the parameter is null by default, the result is the same as when the parameter is false.

     

    Hopes it could help you to understand this optional parameter.

     

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