0

I'm having an issue using the OneDrive for Business - List files in folder action.

I'm setting the path of the action to be a parameter received from a previous step via http request.

The value of the path is for example - /Clients/ER/EDI/ERGL/Source

When I hard code the path by selecting it in the OneDrive action, its value at runtime is

"datasets/default/folders/01RODCPVEAQQCC4IDDRBF3JHJW2GR43CXZ" and at design time it is set to

"path":

/datasets/default/folders/@{encodeURIComponent(encodeURIComponent('01RODCPVEAQQCC4IDDRBF3JHJW2GR43CXZ'))}

However, when I try and set the path via parameter, which at design time looks like this

"path":

/datasets/default/folders/@{encodeURIComponent(encodeURIComponent(triggerBody()?['Source']))}"

and is at run time - /datasets/default/folders/%252FClients%252FER%252FEDI%252FERGL%252FSource

it does not work. I'm obviously missing something here, with encoding the path parameter? Any suggestions?

Thanks,

Hassan Raza
  • 45
  • 10

1 Answers1

0

Actually you get the true path, it's just in a encode format. You could find the example , the encodeUriComponent will return the URI-encoded string with escape characters.

So you could decode what you get with this expression:

decodeUriComponent(decodeUriComponent('%252FClients%252FER%252FEDI%252FERGL%252FSource'))

Then you will get the absolute path.

enter image description here

enter image description here

Hope this could help you, if you still have other questions, please let me know.

George Chen
  • 13,703
  • 2
  • 11
  • 26