cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samschad
Frequent Visitor

Using SPLIT Function to find file extension gives unexpected result

Good morning everyone-

I have a flow that triggers when a new document is added to a Sharepoint library.  The properties of the uploaded SP file are then used to create a 'Document' record in Dynamics 365 Sales using CDS.  

 

Specifically I am trying to run SPLIT on the 'Link to Item' field in SP, to get the file extension and pass that to a field in Dynamics.  It IS working well, but I am having an odd result in that some records created in Dynamics don't just have the extension- they have a lot more letters at the end (that were certainly not a part of the original file in SP):

screenshot.png

 

Is there a better source in SP to get the file extension, maybe?  Any ideas on what might be adding all that extra info in the highlighted records? 

 

The Flow:

screenshot.png

Many thanks-

1 REPLY 1
Paulie78
Super User
Super User

You could perform an additional operation. Use indexOf to find if there is a ? remaining in the file extension, and if there is split the extension on ?. Then the first element of your array will be just the file extension.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,131)