Time window for operating hours only

Hi @ali_aff , I saw last thing yesterday that you had a problem in that the workflow didn’t work if the same machine ID appeared more than once, but it was too late for me last night to assist.

I assume you’ve managed to resolve it now, but just in case, what I was going to suggest was use a row counter, or the row-id to append a suffix to each machine name right at the start of the workflow, thereby making them unique.

I would think that the remainder of the workflow would then work without much alteration. At the end you can then strip off the suffix again, should you wish.

As an example, please see attached. Here a String Manipulation is now placed between the Excel Reader and the rest of the flow, to ensure unique names

image
It applies a suffix to the machine name as follows:
join($ID (BOQ)$,"#",string($$ROWINDEX$$))

I modified the test data to make “ABC 095” appear twice, so after this suffix, the data becomes as follows:

After that, the workflow should work as before, and at the end, should you need to, you can remove the suffix again
image

substr($ID (BOQ)$,0 ,indexOfChars($ID (BOQ)$,"#" ) )

The chosen suffix would depend on your data. I chose “#” as something that wouldn’t appear in the machine name, but if it does, then you simply need to choose some other character (or sequence of characters) that won’t already be in the machine name, so that you can strip them off again.


Operating Hours 3.knwf (184.6 KB)

Is that how you’ve resolved it, or did you use a different approach?

best regards.

4 Likes