
Announcements
Here's my solution to check if the incomming filename complies to the ISO19650:
At request I can share the exported zip file
The event trigger |
|
|
|
To determine if a folder or file was created we evaluate the Document ID Value:
If the output > 0, then it’s a file and the flow continues. Otherwise it terminates.
|
|
|
|
We take the filename without the extention |
|
|
|
split(variables('filename'),'-')
|
|
|
|
replace(variables('get_SplitFilename'),'"','')
|
|
|
|
replace(variables('FinalString'),'[','')
|
|
|
|
replace(variables('FinalStringConverted'),']','')
|
|
|
|
Compose Project: first(split(variables('FinalCleanedupString'),','))
|
|
|
|
Each element of the filename is evaluated in 4 steps.
1: get the item from the Sharepoint list Project IM Setup
Initialize a variable which is filled in the apply to each.
The Compose Project code correct returns true if the value found in the filename exists in the sharepoint list Project IM Setup. If it’s not in the sharepoint list, it returns false. |
|
|
|
Compose Originator: first(skip(split(variables('FinalCleanedupString'),','),1))
|
|
Compose SpatialZone: first(skip(split(variables('FinalCleanedupString'),','),2))
|
|
|
|
Compose Levels: first(skip(split(variables('FinalCleanedupString'),','),3))
|
|
|
|
Compose Informationtype: first(skip(split(variables('FinalCleanedupString'),','),4))
|
|
|
|
Compose ProjectRole: first(skip(split(variables('FinalCleanedupString'),','),5))
|
|
|
|
After the 6th element (Project Role) we have a condition which evaluates it the filename has 7 elements and that the elements correspond with the contents of the sharepoint list. If one of these outputs returned false, the flow stops.
We’ll move this to a new group in Condition 3 in due time.
|
|
|
|
@{first(skip(split(variables('FinalCleanedupString'),','),6))} |
|
|
|
What we do here is put the 7th filename element (the ItemNumber) into an integer. |
|
|
|
In this condition we check the length of the element which should be 4 or more characters, and we check that the number is more than zero.
We’ve added a run after so this evaluation is always done, even if the integer step fails. |
|
|
|
Project: @{outputs('Compose_Project')}
Originator: @{outputs('Compose_Originator')}
Volume: @{outputs('Compose_SpatialZone')}
Level: @{outputs('Compose_Level')}
Filetype: @{outputs('Compose_Informationtype')}
Discipline: @{outputs('Compose_ProjectRole')}
Itemnumber: @{outputs('Compose_ItemNumber')}
|
|
The Project IM Setup list (see image below) is the list of items which determine the columns in the project files library.