I'm trying to get the ID of an item and make it a three digit number string.
I have tried multiple solutions. My most recent is this inside setting a variable
If Oid = 11 I would expect the result to be 011
The log says Oid: 11 and varOrderID:
I have also tried using a calculated field on the list that has a 3 digit number like I want and use the Query a List action to retrieve the calculated field but that also returns with no result.
first of all, check the correct syntax for single inline functions.
eg. PadLeft's first argument should have been source string ...
at second, I think regular exprassion would be much easier for this task.
regular expression pattern:
"it" doesn't return any semicolon... => can you see it in RunNow output?
RE's extract operation always returns a collection. and it has to be aproached that way.
if you approach it differently, eg. as a single line text value, you might see semicolon(s) there, which is collection elements separator
2nd parameter of fn-Substring() defines a position where it should start copy from.
so if your ID is 11, it's length is 2, so you get substring copied starting from 2nd position...
I'm affraid, you will not achieve what you want with fn-Substring(), unitl you calculate correct start position in a compplicated way.
use a regular expression approach as suggested, that's much easier.