Morning everyone,
I have a very complicated (probably more than it should be) flow that collects information from a Microsoft form, including two date fields and two uploaded documents. It sends the documents off for approval and if approved, updates a microsoft list row with an updated date and saves the files into Onedrive with a new file name.
If I leave in the ParseJSON Name expression it brings over the extension of the file but the original name as well, making the new file name very long and disorganized. I am trying to clean up the naming function of the file. I want to be sure the extension is added to the name but the original file name is removed. I would like to make sure the just the extension is added in the File Name section of the Create File step.
How do I go about getting the content type extension added to this file name? Please see the pics below of the current flow.
split(item()?['name'], '.')[1]
Hi @bmcnal ,
This expression is used for replacing the extension directly in Create file action:
Best regards,
I've tried your suggestion and get an error message. I inserted the compose function as you have it written just under the Parse JSON but before the Apply to Each 4. "'The template language function 'split' expects its first parameter to be of type string." Looks like split needs a string input and it's not a string. Thanks for your help.
Hi @bmcnal ,
You can use an expression to get the file extension only:
split(item()?['name'], '.')[1]
Best regards,