I have a flow that separates the file name after an underscore. The first 7 digits are the part number, after the first underscore comes the color number and after the second underscore comes the format. Using the split function with split(variables('String'),'_')[0] I split the name of the document with split(variables('String'),'_')[1] split(variables('String'),'_')[2] and transfer the value from the "Format" field to the "Status" field of the Sharepoint document library. This works perfectly for filenames that are 1017277_31390_7 15 digits long.
But now I want to transfer a value to the Status field also for file names 1021114_10332 which have only one underscore and are 13 digits long, in this case the status should have the value "99". It would be perfect if the condition can be checked that only documents with the extension .png and .jpg are processed.
Translated with www.DeepL.com/Translator (free version)


