I am trying to create a automated flow which will copy the file name into a new column up until the first space in the name. For example:
The uploaded file name is **ZKAL12345-I RTR 123ml Product Label Region 61.PDF so i would like the column to be name ZKAL12345-I
I've found the below code, which works well, however, it stops the naming at the dash (-) and as i am sure you can still im not quite sure how to change it to the requirement above .
substring(triggerBody()?['{Name}'], 0, lastIndexOf(triggerBody()?['{Name}'],'-'))
Any help is appreciated.
Many thanks, Artur